Home >Web Front-end >HTML Tutorial >How to remove defined styles in CSS_html/css_WEB-ITnose
Here’s the thing. For example, I have this style code
.infowindow {
position: absolute;
}
.infowindow .window {
color: #000;
font-family: verdana, sans -serif;
}
.infowindow .window .top .left {
width: 15px;
overflow: hidden;
position: absolute;
}
My code It is public. The code used by others now is to write such a style in their own code style
.top{top: 20px;}.
In this way, their style will affect my style.
Now let me ask the masters. How can I prevent his top:20px; attribute from affecting me without modifying his style?
I have thought about:
.infowindow .window .top{ } But I don’t know what is written in it, so I can remove this attribute.
css important
Hehe, I found it myself.
What I said is equivalent to removing the top attribute. In fact, it means overwriting it and using its default value. auto
http://wenku.baidu.com/link?url=iUzpDGrua_lyxJaPuUG52acfTE6cg-AyhF7nXSAwpkhFKQYt-02uz0PRaWqRuyw4jp0YKEttmaJN16HheKm1szro8IFSzzB4T9EfIC32P7O
Take a look and you will understand