css - 将 Bootstrap 绑定(bind)到单个 div 容器

标签 css twitter-bootstrap oxid

商店系统中包含一个用 php 编写的工具(oxid eShop 作为包含)。该工具是在 Bootstrap 的帮助下编写的。我在 oxid.css(主要商店 css)之后包括了 bootstrap.css 等。现在我遇到了盒子大小等方面的问题。

如果我可以将整个 bootstrap.css 绑定(bind)到一个 container-div,那个 bootstrap 就只适用于那个容器。它会解决我所有的问题。

#myBootstrapContainer { bootstrap only available here }

有人知道怎么做吗?

最佳答案

您不能为网站的一部分设置不同的样式表。查看: Apply different css stylesheet for different parts of the same web page

你可以修改 bootstrap css 并在你的 bootstrap 容器的每个选择器 id 之前添加,例如:

#myBootstrapContainer button {
  overflow: visible;
}

所以 boostrap 的规则应该只适用于你的容器内部

关于css - 将 Bootstrap 绑定(bind)到单个 div 容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36352979/

相关文章:

css - 将 css 类或 id 分配给 cakephp 中的工具提示

html - 背景大小在 IE11 中不起作用

html - dom/css : inclose multiple 100% container into a container larger then the viewport(100%)

mysql - 选择与组中最大值相对应的值

html - 像图表一样有 12 个字段的旋转轮

css - 使用 stylus 解析时 bootstrap.styl 中断

html - 如何在整个站点中重用 HTML

html - Bootstrap : Modal with horizontal form and input addon does not layout properly

javascript - 如何在 OXID eShop 中获取货币名称而不是数字?