In the style, there is a problem about subclasses inheriting the parent class. Now we don’t want the subclass to inherit the style of the parent class, and then the dynamically generated html is like this:
.menu>li>ul>li If written like this, other browsers can achieve the purpose, but it will not work under IE6 , if not written like this, the ulli of the second loop will inherit the previous style. How to solve it?
Reply to the discussion (solution) .menu>li The parent class should also be written like this
.menu>li The parent class should also be written like this
If the parent class is written like this, it can be used except for IE6
Is this what you mean?
I don’t understand why you don’t write like this .menu ul li ul li{}
<style type="text/css"> ul.menu a{ color:#f00; } ul.menu ul a { color:green; } </style>
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn