[英]Why the bootstrap styles are not applied even after the style css file is included?
我已经将bootstrap css和js文件链接到我的index.html中。 但是没有应用样式。 这是我的代码:
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<input id=inputBox style="min-width:50%;" type=text></input>
<button id=submitButton class="btn-btn primary" >Submit</button>
<br/>
<br/>
<div >
<table class="table">
<thead>
<tr>
<th>Sender</th>
<th>Reciever</th>
<th>Group Code</th>
<th>Doc Type</th>
<th>PC</th>
<th>File</th>
</tr>
</thead>
<tbody id=renderOP>
</tbody>
</table>
</div>
</body>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/elasticsearch.js"></script>
<script src="js/jsrender.js"></script>
<script src="config.js"></script>
<script src="js/esmain.js"></script>
</html>
谁能告诉我是什么引起这个问题? 当我用URL替换CSS文件时,它可以工作。 另外,没有自定义css文件从我的css文件夹中获取。
更改
class="btn-btn primary"
至
class="btn btn-primary"
使按钮样式起作用。
看起来您的链接和格式都非常完美,除了button标签应该是“ btn btn-primary类”。 现在我假设您正在使用Ubuntu,但我认为您忘记了对该文件夹中的CSS文件授予权限。 在终端的父文件夹内设置文件夹权限,例如“ chmod -R 777 foldername”,这将解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.