我有一个css箭头框覆盖图像滑块,但我需要使尾部缩进和透明,以便在其后面看到图像.需要白色部分是透明的.请参阅下面的附图和我的css.谢谢.
#flag {
width: 400px; height: 80px; background: #231f20; position: relative;
}
#flag:before {
content: "";
position: absolute;
top: 0;
width: 0;
height: 0;
border-top: 40px solid transparent;
border-bottom: 40px solid transparent;
border-left: 35px solid white;
}
#flag:after {
content: "";
position: absolute;
left: 400px;
bottom: 0;
width: 0;
height: 0;
border-top: 40px solid transparent;
border-bottom: 40px solid transparent;
border-left: 45px solid #231f20;
}
Run Code Online (Sandbox Code Playgroud)