JQ的动画效果很不错

Original 2019-05-17 14:40:30 218
abstract:<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title><script src="../Jquery/jquery-3.4.1.min.js"></script><style

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title></title>

<script src="../Jquery/jquery-3.4.1.min.js"></script>

<style type="text/css">

div{

height: 100px;

width: 100px;

background-color: #008000;

}

p{

width: 200px;

background-color: #FFC0CB;

display: none;

}

</style>

</head>

<body>

<div>我是内容</div>

<script>

$(document).ready(function(){

$('div').hover(

function(){

$(this).css('background','red')

},

function(){

$(this).css('background','yellow')

}

)

$('button').click(function(){

$('p').toggle()

})

})

</script>

<p>我是一个隐藏的内容</p>

<button>点击我</button>

</body>

</html>


Correcting teacher:天蓬老师Correction time:2019-05-17 17:33:27
Teacher's summary:你这不是动画吧, 只有一个框架结构?

Release Notes

Popular Entries