开发者

Styling checkboxes that are even children

开发者 https://www.devze.com 2023-03-27 06:59 出处:网络
I have a whole bunch of checkboxes and want to style all the ones that are even children i.e 2nd, 4th, 6th, 8th.

I have a whole bunch of checkboxes and want to style all the ones that are even children i.e 2nd, 4th, 6th, 8th.

I have tried doing the following but to no avail.

.basic li > di开发者_如何学Pythonv .choices input[type="checkbox"] {
    width:14px;
    height:14px;
    float:left;
    border:0 none;
    background:#fff;
    padding:0;
}

.basic li > div .choices input[type="checkbox"]:nth-child(2n-1) {
    margin:0px 0px 0px 60px;
}


Use :nth-child(even) or :nth-child(2n+0) (any calculation resulting in an even integer) according to:

http://www.w3.org/TR/css3-selectors/

0

精彩评论

暂无评论...
验证码 换一张
取 消