问题
I am using Yii-bootstrap extension and I am having some styling problem because bootstrap css files affect the main content of the page.
My main content is a map done with OpenLayers so I am having several problems with styles mixing between them. I have tried to do a css file more general, as I have seen they recomend on the web,for applying different styles but as they are two "automatic" libraries is a hard work to try to guess how they work and the classes they use.
Is there any way to disable a css file for a concrete div?
回答1:
you can create a class for that div and reset the values you have changed for general divs.
回答2:
Nothing that I'm aware of, no.
回答3:
The only way I can see is..
<div class="outer">
<div class="inner" >
Inner Content
</div>
</div>
You could do something like..
.outer{
}
.outer .inner{
/* override the specific styles you need here */
}
来源:https://stackoverflow.com/questions/11793568/disable-a-css-for-part-of-the-content