商店系统中包含一个用 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/