我不知道为什么这不起作用。这是CSS代码:
#status
{
width: 865px;
margin: 0 0 0 240px;
float: left;
}
#status fieldset
{
width: 100%;
border:1px solid #990000 ;
padding: 10px;
border-radius: 5px;
}
#status fieldset legend
{
padding: 5px 15px;
background-color:#303030;
color:#fff;
}
HTML:
<div id="status"><fieldset><legend>Bla bla</legend><table class=""></table></div>
但是我在表格中使用了border-radius。令人惊讶的是,它有效!所以我认为这不是浏览器问题。顺便说一下,我正在使用IE9。谢谢。
答案 0 :(得分:0)
您没有关闭字段集标记。你应该改为
<div id="status"><fieldset><legend>Bla bla</legend><table class=""></table></fieldset></div>
如果您需要检查CSS属性的兼容性,Mozilla开发者网络有一个全面的列表 - https://developer.mozilla.org/en-US/docs/Web/CSS/Reference)。
答案 1 :(得分:-1)
请使用以下
更新您的代码#status fieldset {width:100%;display:block;background:#ff0000;position:relative;zoom:1;border:1px solid#990000;padding:10px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;position:relative;min-height:100px;}#status fieldset legend {padding:5px 15px;background-color:#303030;color:#fff;position:absolute;top:-16px;}