仅在特殊div中使用引导程序

Fel*_*lix 5 css html5 css3 twitter-bootstrap twitter-bootstrap-3

我在TYPO3前端插件中使用了bootstrap,但是我只想在特殊的div中使用它,这样without_bootstrap就不会从bootstrap类中碰到该类。

例如

<div class="without_bootstrap">
     <div class="with_bootstrap">
     </div>
</div>
Run Code Online (Sandbox Code Playgroud)

那可能吗?

mmg*_*oss 3

部分地。如果您避免使用引导程序使用的类名,应该没问题。但bootstrap定义了一些特定于标签的样式,例如

a {
  background-color: transparent
}
Run Code Online (Sandbox Code Playgroud)

您可以通过定义如下样式来避免这种情况:

.without-bootstrap > a {
  /* whatever */
}
Run Code Online (Sandbox Code Playgroud)

例子:

a {
  background-color: transparent
}
Run Code Online (Sandbox Code Playgroud)
.without-bootstrap > a {
  /* whatever */
}
Run Code Online (Sandbox Code Playgroud)

另一个解决方案可能是根据您的需求自定义引导程序: http://getbootstrap.com/customize/