<分区>
<分区>
我目前正在使用其他人使用 Wordpress 制作的网站,我必须在其中添加一些网页。我已经用 PHP 完成了所有功能部分,现在我必须完成设计部分。为此,我想使用 Bootstrap,但是当我在已经存在的标题中链接 bootstrap 时,网站的某些部分也会发生变化。
我认为它们有一些共同的类名和 ID 名,所以我想知道是否有任何方法可以仅在我的网页上使用 Bootstrap。 总而言之,我包括了已经存在的页眉和页脚,我想在正文中使用 Bootstrap,这可能吗?
最佳答案
header.php 文件中的链接 Bootstrap :
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
可选,如果您也喜欢 JavaScript:
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
这两个都是直接从 Bootstrap guide 复制的.您现在可以在 HTML 中使用这些:
<div class="container-fluid">
<div class="row">
<div class="col-sm-6"><p>Oh hey</p></div>
<div class="col-sm-6"><p>Oh hey</p></div>
</div>
</div>
关于php - 在现有网站上有选择地使用 Bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38529206/