HTML 练习滑动
- 作者: 丶InMyHeart
- 来源: 51数据库
- 2021-08-22
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<script src="jquery-3.3.1.min.js"></script>
<style>
#flipshow, #content, #fliphide, #toggle{
padding: 5px;
text-align: center;
background-color: blueviolet;
border: solid 1px; red;
}
#content{
padding: 50px;
display: none;
}
</style>
</head>
<body>
<div id="flipshow">显示</div>
<div id="fliphide">隐藏</div>
<div id="toggle">toggle</div>
<div id="content">hello world</div>
</body>
<script>
$("#flipshow").click(function(){
$("#content").slidedown(1000);
})
$("#fliphide").click(function(){
$("#content").slideup(1000);
})
$("#toggle").click(function(){
$("#content").slidetoggle(1000);
})
</script>
</html>
推荐阅读
