我的第一個問題是關於小提琴不工作。現在它可以工作,但如果我將它複製到我的括號文件中,它不再起作用。我確實包含了我放置在外部資源中的鏈接。 這裏是小提琴:https://jsfiddle.net/wtbdxx2b/6/JS/CSS幻燈片效果在小提琴中工作,而不是在html中
而html;
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="site3.css">
<link href="https://fonts.googleapis.com/css?family=Lato:300" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="site3.js"></script>
</head>
<body>
<button class="trigger">
click
</button>
<div class="content">
hello
</div>
</body>
</html>
the css;
.content {
position: absolute;
width: 100%;
height: 10%;
bottom: 0;
left: 0;
background-color: #000;
color: #FFF;
transition: all 1s;
}
.content.open {
height: 90%;
}
和javascript;
$(".trigger").click(function() {
$(".content").toggleClass("open");
});
什麼的'console'說? – LYu
它說什麼都沒有,當我點擊按鈕 – SG73