2017-04-09 20 views
0

「x」ボタンをクリックしたときに消えてしまう警告が表示されていますが、何も表示されていないように見えます。仕事へのdismissibleため破棄可能な警告

<div class="alert alert-success alert-dismissible"> 
<button type = "button" class="close" data-dismiss = "alert">x</button> 
    You've done it! 
</div> 
+0

あなたの質問は、ブートストラップについて話しているときにのみ意味があります。より正確に質問してください。 –

答えて

2

、あなたの文書にjQuerybootstrap.jsを含める必要があります。

<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>Bootstrap 101 Template</title> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
</head> 
<body> 
<div class="alert alert-success alert-dismissible"> 
    <button type = "button" class="close" data-dismiss = "alert">x</button> 
    You've done it! 
</div> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
</body> 
</html> 
+0

ありがとうございます!私はJqueryが不足していた。 –

関連する問題