作业源码如下
实例
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>春天的故事</title> <style type-"text/css"> div{ width:400px; height: 250px; color: red; font-size:15px; padding:10px; border-radius: 15px; box-shadow: 5px 5px 5px #888; background-image: url(images/pt1.jpg); background-size: 430px 280px; background-repeat:no-repeat; } .text{ color: red; line-height: 1.5em; text-indent: 2em; } </style> </head> <body style="text-align:center"> <div> <h3 style="color:#0000FF; text-align: center;font-size:20px" onmouseover="change(this)" onmouseout="old(this)">咏柳</h3> <p> <p><b>碧玉妆成一树高</b></p> <p><b>万条垂下绿丝绦</b></p> <p><b>不知细叶谁裁出</b></p> <p><b>二月春风似剪刀</b></p> </div> <script type="text/javascript"> function change(element){ element.style.fontSize = "30px" element.style.color = "green" } function old(element){ element.style.fontSize = "20px" element.style.color = "#0000FF" } </script> </body> </html>
运行实例 »点击 "运行实例" 按钮查看在线实例
作业效果图
鼠标未经过标题效果
鼠标经过标题时效果
手抄源码作业