Czy w css jest możliwe dziedziczenie stylu w górę, tzn. powiedzmy mamy taki kod
<http://december.com/html/4/element/div.html class="parent"> <http://december.com/html/4/element/div.html class="child"> </http://december.com/html/4/element/div.html> </http://december.com/html/4/element/div.html> .parent > .child { background:#cccccc; }
CSS nie umożliwia operowanie w górę drzewa. Miało być w CSS4.
Podany selektor nie do tego służy.
Możesz to zasymulować stylując pseudoelement :before (:after) elementu .child, podobnie jak element .parent.
https://jsfiddle.net/27LacfhL/
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)