js动画效果

Original 2019-01-15 21:01:00 224
abstract:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>js动画</title><style>div{width:100px;height:100px;background-color:lightbl

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>js动画</title>

<style>

div{width:100px;height:100px;background-color:lightblue;}

</style>

</head>

<body>

<div></div>

<script>

var div = document.getElementsByTagName('div')[0];

div.onmouseover = function()

{

this.style.width = '500px';

this.style.height = '500px';

}

div.onmouseout = function()

{

this.style.width = '100px';

this.style.height = '100px';

}

</script>

</body>

</html>


Correcting teacher:灭绝师太Correction time:2019-01-16 09:10:34
Teacher's summary:课程到目前为止,作业这样不应该哦,可以附代布局案例,比如js效果的导航

Release Notes

Popular Entries