html - Css nth-child works strange -


i try make striped table. when try use nth-child, works strange

template:

... <tr class="striped">...</tr> <tr class="more">...</tr> ... 

css:

tr.striped:nth-child(odd) {     background-color : rgba($maincolor, .1); } 

but tr striped class colored. maybe miss feature of specification?

use :

tr:nth-child(4n+1) 

instead of:

tr.striped:nth-child(odd) 

demo: https://jsfiddle.net/sabeti05/epnjn1wo/


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -