Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.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
斑马被剥光,圆角不适用于Firefox_Firefox_Css_Zebra Striping - Fatal编程技术网

斑马被剥光,圆角不适用于Firefox

斑马被剥光,圆角不适用于Firefox,firefox,css,zebra-striping,Firefox,Css,Zebra Striping,我的网站上有几个列表: 背景是斑马线。在Chrome中,我也得到了圆角,看起来很漂亮,但在Firefox中它不起作用。我看了无止境的帮助网站没有成功。我学到的唯一一件事是,当“边界塌陷设置为塌陷”时,圆角不起作用,但我找到了一种解决方法。然而,它仍然不起作用。。。。快把我逼疯了 这是我目前使用的CSS: * TABLES CODES --------------------------------------- */ table.zebra { width: 100%; bor

我的网站上有几个列表:

背景是斑马线。在Chrome中,我也得到了圆角,看起来很漂亮,但在Firefox中它不起作用。我看了无止境的帮助网站没有成功。我学到的唯一一件事是,当“边界塌陷设置为塌陷”时,圆角不起作用,但我找到了一种解决方法。然而,它仍然不起作用。。。。快把我逼疯了

这是我目前使用的CSS:

* TABLES CODES
--------------------------------------- */

table.zebra {
    width: 100%;
    border-spacing: 0px;
    border-collapse: separate; 



}

.zebra td {
    padding: 10px;
    text-align: left; 


}

.zebra tr td:first-child {
    -moz-border-radius-topleft: 10px;
        -moz-border-radius-bottomleft: 10px;
    -webkit-border-top-left-radius: 10px;
        -webkit-border-bottom-left-radius: 10px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;

}

.zebra tr td:last-child {
    -moz-border-radius-topright: 10px;
    -moz-border-radius-bottomright: 10px;
    -webkit-border-top-right-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;

}



.zebra tbody tr:nth-child(even) {
    background: #F0F0F0!important;
    color:#000;

}

尝试更改此CSS位:

.zebra tbody tr:nth-child(even) {
    background: #F0F0F0!important;
    color:#000;

}
对此

.zebra tbody tr:nth-child(even) td {
    background: #F0F0F0!important;
    color:#000;

}

我的解决方案是不使用表。。。这不是表格式的数据,同样的视觉效果也可以通过“sThanks”来实现,我想我被这些表卡住了。我对Firefox中的圆角没有任何问题,它只是在表中,我无法让它工作。我只是注意到你的背景色应用于TR而不是TD,而TD是有圆角的。请看下面我的答案,当你试过的时候评论一下,如果它不起作用,我会再看一眼。我理解。它变魔术了。这就解释了为什么我在下面添加boarder right等代码,从而获得圆角的少数情况下,我可以看到拐角“外部”的背景。zebra tr td:first child{moz border radius topleft:10px;-moz border radius bottomleft:10px;-webkit border top left radius:10px;-webkit border left radius:10px;@user2777371解决了您的问题吗?是的,它解决了我的问题