6C25A51A041E5AACD05AF84E9A065889.gif
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript">
window.onload = function () {
var divO = document.getElementById('div1')
divO.onmouseover = toGreen
divO.onmouseout = tored
}
function toGreen() {
var divO = document.getElementById('div1')
divO.style.width = '50px'
divO.style.height = '50px'
divO.style.backgroundColor = 'red'
}
function tored() {
var divO = document.getElementById('div1')
divO.style.width = '100px'
divO.style.height = '100px'
divO.style.backgroundColor = '#20a0ff'
}
</script>
<style>
#div1 {
width: 100px;
height: 100px;
background-color: #20a0ff;
transition: 1s;
}
</style>
</head>
<body>
<div id="div1">
</div>
</body>
</html>