Twitter bootstrap 添加圆角的背景封面[CSS/Twitter';s Bootstrap]
我用Twitter给我的网站一个一致的外观,当我给一个表的Twitter bootstrap 添加圆角的背景封面[CSS/Twitter';s Bootstrap],twitter-bootstrap,css,Twitter Bootstrap,Css,我用Twitter给我的网站一个一致的外观,当我给一个表的thead tr添加背景时,我遇到了一些问题。以下是来自Bootstrap的CSS: .table-bordered { border: 1px solid #ddd; border-collapse: separate; *border-collapse: collapsed; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius:
thead tr
添加背景时,我遇到了一些问题。以下是来自Bootstrap的CSS:
.table-bordered {
border: 1px solid #ddd;
border-collapse: separate;
*border-collapse: collapsed;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
-webkit-border-radius: 4px 0 0 0;
-moz-border-radius: 4px 0 0 0;
border-radius: 4px 0 0 0;
}
以下是我的CSS:
tr.title
{
background-color: #2c2c2c;
background-image: -moz-linear-gradient(top, #333333, #222222);
background-image: -ms-linear-gradient(top, #333333, #222222);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
background-image: -webkit-linear-gradient(top, #333333, #222222);
background-image: -o-linear-gradient(top, #333333, #222222);
background-image: linear-gradient(top, #333333, #222222);
background-repeat: repeat-x;
}
以及相关的HTML:
<thead>
<tr class="title">
<th colspan="5"><strong><a href="{$url}">{$name}</a></strong><br />{$description}</th>
</tr>
</thead>
{$description}
问题是左上角的圆角被
.title
背景删除。当我删除背景代码时,它会返回。如何修复此问题?当设置背景图像时,会丢失圆角,必须重新定义边界半径: 例如:
.modal-header {
cursor: pointer;
background-image: url('myimg.jpg');
border-radius: 6px 6px 0 0;
}
在Bootstrap3.0中,您需要将表放入面板中 HTML:
什么浏览器?IE9似乎无法将背景渐变剪裁到边界半径。也许可以查看背景剪辑属性?在摆弄它之后,它看起来像是
th
出于某种原因导致了问题。添加相同的边界半径
定义修复了它。为了记录在案,我正在使用Chrome。啊,是的,这是有道理的,有点。TR没有剪辑它的内容,这就是为什么TH的直角会弹出的原因。
<div class="panel panel-primary">
<table class="backgrounded table">
<thead>
....
<thead></table></div>
.backgrounded thead {
background: #499bea;
}