
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>第一节课的内容</title>
<style type="text/css">
div{
height: 400px;
width: 500px;
margin-right: auto;
margin-left: auto;
background-color: blue;
}
h3{
text-align: center;
}
p{
color: yellow;
margin-left: 20px;
margin-right:20px;
}
.aaa{
color: white;
background-color: black;
}
</style>
</head>
<body>
<div>
<h3 onmousemove="changeto(this)" onmouseout="changeback(this)">
JS我不会咋办啊
</h3>
<p>
这个JS啊,我以前就是想学,但是呢,就是感觉看不懂,经过今天一晚上的强化训练,老师也讲了,终于,终于,我还是看不懂,下面的这个JS代码是我打出来的,但是我还是不懂,以后该咋办啊,我愁死了!
</p>
<p>还得手写代码啊,这个怎么搞啊,我快疯了。</p>
<script>
function changeto(element){
element.style.color="red"
element.style.fontSize="30px"
}
function changeback(element){
element.style.color="black"
element.style.fontSize="24px"
}
</script>
</div>
</body>
</html>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号