相关疑难解决方法(0)

使用css创建自定义箭头形状

我有一个css箭头框覆盖图像滑块,但我需要使尾部缩进和透明,以便在其后面看到图像.需要白色部分是透明的.请参阅下面的附图和我的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)

html css shape css3 css-shapes

4
推荐指数
2
解决办法
3140
查看次数

标签 统计

css ×1

css-shapes ×1

css3 ×1

html ×1

shape ×1