이 페이지에서 작업하고 있습니다 : link to page.
인사이드 h2
나는 before
및 after
엘리먼트를 가지고 있습니다. IE에서는이 이미지가 작동하지 않는 너비와 높이, 원래 너비와 높이를 사용합니다. FF와 Chrome에서이 문제를 해결하려고 할 때 모든 것이 점점 더 악화되고 있습니다.
가장자리에서는 약간의 차이가 있습니다. 이미지를 더 작게 만드는 방법을 알아 냈지만 before
요소는 내부에 있습니다. h2
텍스트입니다.
다음은 예입니다
(FF에서와 크롬) 정상
조금 이상한 (에지)에서
CSS 코드 (IE에서) 그래서 미친 :IE 및 Edge의 의사 요소 앞뒤에
h2{/*How I am displaying h2 elem */
text-align: center;
width: 80%;
margin: 45px auto 115px !important;
text-transform: uppercase;
color: #fff;
}
h2::before {
content: url(img/pepper.svg);
margin-right: 10px;
position: relative;
height: 50px;
}
h2::after{
content: url(img/apple.svg);
margin-left: 10px;
position: relative;
height: 50px;
}
@supports (-ms-accelerator:true) { /*Trying to resolve problem in Edge */
h2::before {
position: absolute;
}
h2::after{
position: absolute;
}
}
h2 너비 80 %를 제거하고 시도하십시오. – ankit
오, 정말 간단했습니다, 고마워요! :) 또한 가장자리에서'지원 '해결 된 문제를 제거합니다. – ptyskju