Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 从中间向div底部添加框阴影_Css_Border_Box Shadow - Fatal编程技术网

Css 从中间向div底部添加框阴影

Css 从中间向div底部添加框阴影,css,border,box-shadow,Css,Border,Box Shadow,我已经附上了我想要的预览。老实说,我找不到合适的词来形容它,所以我没有运气去寻找如何做到这一点 非常感谢。我刚刚在底部显示了我提供的图像。不确定是否有其他方法可以使用伪元素创建椭圆形并给它一个长方体阴影。使用box shadow和height值来获得您想要的确切内容 div { width: 300px; height: 300px; background-color: #FFF; position: relative; } div:after { content: ''

我已经附上了我想要的预览。老实说,我找不到合适的词来形容它,所以我没有运气去寻找如何做到这一点


非常感谢。

我刚刚在底部显示了我提供的图像。不确定是否有其他方法

可以使用伪元素创建椭圆形并给它一个长方体阴影。使用
box shadow
height
值来获得您想要的确切内容

div {
  width: 300px;
  height: 300px;
  background-color: #FFF;
  position: relative;
}

div:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  border-radius: 50%;
  z-index: -1;
  box-shadow: 0 8px 10px -10px rgba(0, 0, 0, 0.5);
}

盒影:0px 3px 5px rgba(0,0,0.5)@Blazemonger抱歉,这不是我想要做的