이미지 앞에 빈 css 화살표를 만들려고합니다.빈 화살표 이미지 앞에
나는 그것을 얻었다. .. 그러나 그것은 매우 더러웠다. 이 작업을 수행하는 더 좋은 방법이 있습니까? 브라우저 간 호환성 (IE8 이상)이 우수합니다.
SCSS
.arrowwrap {
width:100%;
padding:0;
position:relative;
overflow:hidden;
margin:-$arrow_height 0 0 0;
&:after {
content:'';
position:absolute;
height:$arrow_height;
width:50%;
margin:-$arrow_height 0 0 -$arrow_width;
left:0;
z-index:99999;
background:$box_color;
}
&:before {
content:'';
position:absolute;
height:$arrow_height;
width:100%;
left:50%;
margin:0 0 0 $arrow_width;
z-index:99999;
background:$box_color;
}
.arrowone {
width: 0;
height: 0;
border-style: solid;
border-width: $arrow_height $arrow_width 0 $arrow_width;
/* border-color: transparent transparent #333 transparent; */
border-color:transparent $box_color $box_color $box_color;
margin:auto;
}
}
IE8 확실
은 –
그는이 아닌 의미 화살표 요소를 필요로하며, 의존 의미 @Alek "아주 더러운 느낌"이해할 수 없다 '이전'과 '이후'모두에서 그가 더 쉽게 할 수 있어야한다고 느낀 것에 대한 많은 마크 업입니다 – Joe
관련 질문 : http://stackoverflow.com/questions/23758922/transparent-css-arrow-triangle-over-an-image/23759602#23759602 –