fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <style> #myDIV{ position:absolute; width:100px; height:100px; background-color:coral; color:white; } </style> </head> <body> <p>点击“尝试一下”按钮设置 DIV 元素的 boxShadow 属性:</p> <button onclick="myFunction()">尝试一下</button> <div id="myDIV"> <h1>myDIV</h1> </div> <script> function myFunction(){ document.getElementById("myDIV").style.boxShadow = "10px 20px 30px lightblue"; } </script> </body> </html>
运行结果