Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
行或html元素中的css/js/php圆角_Css_Rounded Corners - Fatal编程技术网

行或html元素中的css/js/php圆角

行或html元素中的css/js/php圆角,css,rounded-corners,Css,Rounded Corners,应该有一种方法可以使用几行代码在表行或元素中创建圆角。(这似乎比使用图像的其他更复杂方法更可取。) 然而,作为一个css/js noob,我不知道该怎么做。我可以把它放在元素内的样式标记中进行取整吗?是否将其放入.css文件中?我不希望这适用于所有行或表格单元格,只适用于一个。非常感谢您提供了正确的语法/用法。您可以在容器上的样式属性中执行此操作: <div style="-moz-border-radius: 15px; border-radius: 15px;">....<

应该有一种方法可以使用几行代码在表行或元素中创建圆角。(这似乎比使用图像的其他更复杂方法更可取。)


然而,作为一个css/js noob,我不知道该怎么做。我可以把它放在元素内的样式标记中进行取整吗?是否将其放入.css文件中?我不希望这适用于所有行或表格单元格,只适用于一个。非常感谢您提供了正确的语法/用法。

您可以在容器上的样式属性中执行此操作:

<div style="-moz-border-radius: 15px; border-radius: 15px;">....</div>
。。。。
或者在css文件中:

.class1 { 
    -moz-border-radius: 15px; 
    border-radius: 15px; 
}  

//and add it to your container:
<div class="class1">....</div>
.class1{
-moz边界半径:15px;
边界半径:15px;
}  
//并将其添加到您的容器中:
....

据我所知,这不是IE 8或bellow的友好版本,尽管在Chrome、Safari和Firefox(等)中也可以使用

如果你只打算用一次,直接把它放在你的容器里

<div style="-moz-border-radius: 15px; border-radius: 15px;"> Content here </div>
这里的内容
如果要在页面上多次使用此选项,我建议将其放在页面顶部的标题(或样式表文件)中:


.圆角{
-moz边界半径:15px;
边界半径:15px;
}  
在容器里放

<div class="roundedcorners"> Content here </div>
这里的内容

这里有一个有用的网站可以帮助您在表格中使用它:

浏览器(或规范)可能不允许
tr
td
具有圆形边框。这是否可能仅适用于td,而不适用于div、span或tr?我把类放在标题中的一个标记中,然后在标记中调用,它工作了,所以我现在很好。然而,当我在tr、div或span中尝试它时,它不起作用。作为一个相关的问题,我的.css文件似乎确实在工作。我有它在里面。我为一些javascript添加的另一个.css链接是否会产生干扰?您可以使用任意数量的标记。边框半径适用于所有块元素,因此有时需要为元素指定宽度和高度,并在CSS中显示
display:BLOCK
<style type="text/css">
    .roundedcorners { 
        -moz-border-radius: 15px; 
        border-radius: 15px; 
    }  
</style>
<div class="roundedcorners"> Content here </div>