Css: nth-of-type () selector usage, nth-of-type Selector
I made a page today and accidentally saw thisnth-of-type
It is quite convenient. Some of the previous single and double lines have horizontal lines, and some do not have horizontal lines. Generally, border-right: none and so on are separately written in html. Now we can quickly record this good thing.
: Nth-of-type (N) The selector matches each element of the nth child element of a specific type of the parent element.NIt can be a number, a keyword, or a formula.
. Uninstall_form. uninstall_list_checkbox: nth-of-type (odd) {border-right: 1px solid # e6e6e6}
<Form onsubmit = "return check () "action =" "method =" post "name =" post_unintall "id =" post_unintall "> <div class =" uninstall_list "> <input type =" checkbox "id =" uninstall_list1 "name =" my_check [] "value =" 1 "> <label class =" uninstall_list_checkbox "> I want to download the anzhi market for a software result </label> </div> <div class = "uninstall_list"> <input type = "checkbox" id = "uninstall_list1" name = "my_check []" value = "2"> <label class = "uninstall_list_checkbox"> mobile phone problems, try uninstalling and reinstalling </label> </div> <div class = "uninstall_list"> <input type = "checkbox" id = "uninstall_list2" name = "my_check []" value = "3"> <label class = "uninstall_list_checkbox"> incomplete software, many software cannot be found </label> </div>
.....
</Form>
The right side of an odd row of the odd is a line with an even number of even rows. You can also use 2n + 1 to represent an odd number, 2n to represent an even number, and 3n + 1 to represent each of the three displays.
Similar
: Nth-child (N) The selector matches the nth child element of the parent element, regardless of the element type.NIt can be a number, a keyword, or a formula.