【发布时间】:2019-11-16 18:21:14
【问题描述】:
我想为我的所有元素添加 box-shadow(见图)
但我不知道如何正确地为 ::after. 添加 box-shadow
我现在的 CSS 代码 -
.controll_btn {
transition: all 0.1s ease;
position: relative;
width: 50px;
height: 40px;
background-color: #00a4ff;
cursor: pointer;
box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.3);
border-radius: 4px;
border: none;
padding: 10px 15px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-content: space-between;
outline: none;
z-index: 5;
}
.controll_btn::after {
content: "";
position: absolute;
right: 0;
bottom: -8px;
z-index: -50;
border-top: 11px solid #00a4ff;
border-left: 11px solid transparent;
filter: 0 0 6px 0 rgba(0, 0, 0, 0.3);
}
如果有人知道如何添加相同的盒子阴影,请写!谢谢!
【问题讨论】:
标签: html css after-effects box-shadow