亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

用鼠標(biāo)事件改變樣式

original 2018-12-31 00:17:22 243
abstrait:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>鼠標(biāo)移動(dòng)事件</title> <style type="text/css"> .box{ width: 200px;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>鼠標(biāo)移動(dòng)事件</title>
<style type="text/css">
.box{
width: 200px;
height: 200px;
border: 1px solid red;
border-radius: 10px;
}
</style>
</head>
<body>
<div onmousemove="mover(this)" onmouseout="out(this)"></div>
<script type="text/javascript">
function mover(m){
m.style.backgroundColor="red";
m.style.borderRadius="100px";
}
function out(o){
o.style.backgroundColor="blue";
o.style.borderRadius="10px";
}
</script>
</body>
</html>


Professeur correcteur:天蓬老師Temps de correction:2018-12-31 16:13:54
Résumé du professeur:你的這個(gè)事件有點(diǎn)簡(jiǎn)單, 其實(shí)用偽類:hover, 給這個(gè)元素添加上, 也能實(shí)現(xiàn)這樣的效果,不是嗎?試試看

Notes de version

Entrées populaires