<!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta name="author" content="http://www.softwhy.com/" /> <title></title> <style type="text/css"> *{margin: 0;padding: 0;} body{font: 12px '微软雅黑';background-color: #eee;} ul{list-style: none;} a{text-decoration: none;color: #000;} .clearfix:after{content: '';display: block;clear:both;} .box2{ width: 100px; height: 100px; margin: 200px auto; background-color: red; /* 设置盒子的阴影 水平偏移量 垂直偏移量(可不写) 模糊半径(可不写) 扩展半径 不占空间 */ box-shadow:4px 4px 12px #000 , -4px 4px #ff0, 4px -4px #00f, -4px -4px green; /* 内部阴影 inset只能内部产生 */ /* box-shadow:10px 10px black; */ } /* 四彩环 */ .box{ width: 300px; height: 300px; /* background-color: pink; */ margin: 50px; /* 谷歌浏览器前缀 */ -webkit-box-shadow:10px 0px #f60, -10px 0px #f00, 0px 10px #00f, 0px -10px #0f0; -o-box-shadow:10px 0px #f60, -10px 0px #f00, 0px 10px #00f, 0px -10px #0f0; /* 火狐 */ -moz-box-shadow:10px 0px #f60, -10px 0px #f00, 0px 10px #00f, 0px -10px #0f0; ; box-shadow: 10px 0px #f60, -10px 0px #f00, 0px 10px #00f, 0px -10px #0f0; /* 圆角 */ border-radius: 50%; } </style> </head> <body> <!-- <div class="box"></div> --> <div class="box2"></div> </body> </html>
标签:box,盒子,00f,阴影,10px,shadow,0px,4px From: https://www.cnblogs.com/ljingjing/p/17482585.html