为三角形伪元素添加边框和阴影

我想在这些三角形之一中添加底部边框(2-3px)和阴影框,但是由于它们的区域已经通过:before添加,因​​此我对如何做到这一点有所保留。有办法以某种方式实现这一目标吗?

.container {
  width: 300px;
  height: 100px;
  background: blue;
  position: relative;
}

.green {
  background: green;
}

.container:before {
    content: "";
    position: absolute;
    left: 0;
    z-index: 9999;
    top: 72px;
    border-top: 20px solid red;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    bottom: -20px;
}
<div class="container"></div>
<div class="container green"></div>

gouihk7 回答:为三角形伪元素添加边框和阴影

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3166507.html

大家都在问