不对称的CSS阴影

前端之家收集整理的这篇文章主要介绍了不对称的CSS阴影前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我怎样才能创建像这样的阴影?
只在底角和渐变.

enter image description here

最佳答案
使用你的CSS如下.

HTML

Box myBox"> Box

CSS

.Box h3{
	text-align:center;
	position:relative;
	top:80px;
}
.Box {
	width:70%;
	height:200px;
	background:#FFF;
	margin:40px auto;
}

/*==================================================
 * MyBox
 * ===============================================*/
.MyBox
{
  position: relative;
}
.MyBox:before,.MyBox:after
{
  z-index: -1;
  position: absolute;
  content: "";
  bottom: 15px;
  left: 10px;
  width: 50%;
  top: 80%;
  max-width:300px;
  background: #777;
  Box-shadow: 0 15px 10px #777;
  transform: rotate(-3deg);
}
.MyBox:after
{
  transform: rotate(3deg);
  right: 10px;
  left: auto;
}
Box MyBox"> Box
原文链接:https://www.f2er.com/css/427244.html

猜你在找的CSS相关文章