0

这是示例:http: //jsfiddle.net/wvCnW/

我无法访问 html,只能访问 CSS。因此,为了获得带有蓝色边框的红色框,我使用了这个 hacky 解决方法:

form
    input:first-child
    + input
    + input
    + input
    + input
    + input
    + input
    + input
    + table
        tr:first-child
        + tr
            td{
                background-color:red !important;
                border:2px solid blue;
                height:132px;
                }

这适用于我检查过的主要现代浏览器,但不适用于 ie8。我不知道为什么因为 ie8 显然支持 CSS 2.1

http://caniuse.com/#feat=css-sel2

4

0 回答 0