<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style type="text/css"> div{ width: 420px; height: 260px; padding: 10px; box-shadow: 5px 5px 5px #888; background-image: url(images/lsm.jpg); background-size: 440px 280px; background-repeat: no-repeat; border-radius: 15px; } .text{ color: #363636; text-indent: 2em; line-height: 2em; </style> <title>3月15日作业</title> </head> <body> <div> <h3 style="color:black;text-align:center;font-size:20px;" onmouseover="change(this)" onmouseout="old(this)" >陋室铭 </h3> <p >山不在高,有仙则名。水不在深,有龙则灵。斯是陋室,惟吾德馨。苔痕上阶绿,草色入帘青。谈笑有鸿儒,往来无白丁。可以调素琴,阅金经。无丝竹之乱耳,无案牍之劳形。南阳诸葛庐,西蜀子云亭。孔子云:“何陋之有?”</p> </div> <script type="text/javascript"> function change(element){ element.style.fontSize = '24px' element.style.color = 'brown' } function old(element){ element.style.fontSize = '20px' element.style.color = 'black' } </script> </body> </html>