Is there any kind of inheritance in css?
For example, divA, divB, divC all existing in the same spot with all the same properties, only differing by their z-index?
The idea being using jquery or whatnot to have different transitions between the sections.
Is anything like this possible or am I going about this the wrong way?
Yes. Most properties can be given the value
inheritwhich means “The same value for this property as the parent node has”. This isn’t the type of inheritance you are thinking of though.CSS has no way to say that one rule-set should copy values from another one. You can do:
or various other strategies including generating your CSS using a script and using multiple classes on a single element.