相关疑难解决方法(0)

将样式表限制为一个标记和后代

我想在我正在使用的某个网站上使用twitter bootstrap.此站点需要预设模板才能用于页面的某些部分.

如果我包含twitter bootstrap样式表,它会混淆原始模板.

我想要包含外部bootstrap.cc样式表,但只使它适用于class ="mycontent"后代的标签

<html>
<link href="original stylsheet.css">
<link href="bootstrap.css">
...
...
<div class="header">
original stlesheet to be used here
</div>
<div class="mycontent">
bootstrap css to work for all descendents of my content
</div>
Run Code Online (Sandbox Code Playgroud)

我知道一种方法是编辑css并在每个标记之前添加.mycontent.但我想知道是否有更智能的解决方案

html css styles stylesheet

7
推荐指数
1
解决办法
1693
查看次数

标签 统计

css ×1

html ×1

styles ×1

stylesheet ×1