Ash*_*hir 15 alert dismiss twitter-bootstrap
我正在使用Google Chrome.
使用Twitter Bootstrap,我想添加一个简单的警报,不幸的是当按下x时警报没有消失!
这是基于警报文档的代码:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Warning!</strong> Best check yo self, you're not looking too good.
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我也尝试过:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="alert">
<a href="#" class="close" data-dismiss="alert">×</a>
<strong>Warning!</strong> Best check yo self, you're not looking too good.
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
什么是让它解雇?
Ash*_*hir 20
感谢davidkonrad的评论.
通过添加以下内容,解决方案是微不足道的:
<script src="js/bootstrap.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15491 次 |
| 最近记录: |