Browser is how to resolve css selectors

About browser is how to resolve css selector, all along, I always thought it was from left to right, then I looked up some articles, find the browser parses css selector from right to left.

For example:
HTML:
Here Insert Picture Description
CSS
Here Insert Picture Description
ago mistaken find someone to find li ul li class and then find the name of the span to draw red color

In fact, in fact the first to find a class called red span to draw on red, and then look up the li tag, and then further on to find out ul tag, then for rules painted red

The front novice, please indicate there is a problem, thank you very much, hope to contact infringing legislation deleted QQ 643595853 Thank you ~

Guess you like

Origin blog.csdn.net/jyy5806/article/details/93191565