Home  >  Article  >  Web Front-end  >  How to remove defined styles in CSS_html/css_WEB-ITnose

How to remove defined styles in CSS_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:54:561398browse

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.


Reply to discussion (solution)

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

Statement:
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