box-shadow 属性向框添加一个或多个阴影。
<!DOCTYPE html> <html> <head> <style> div { width:300px; height:100px; background-color:#ff9900; -moz-box-shadow: 10px 10px 5px #888888; /* 老的 Firefox */ box-shadow: 30px 20px 5px #888888; /* 水平阴影 垂直阴影 模糊距离 颜色 */ } </style> </head> <body> <div></div> </body> </html>
效果