에서 pseudo 요소에서 작동하지 않습니다. firefox 12+ (어쩌면 이전)에서 의사 요소에 위치에 문제가 있습니다. 요소는 페이지에 상대적으로 보이지만 앵커 태그에 position:relative
이 있습니다. 어떤 제안?위치 절대 절대 firefox 12 +
HTML
<a href="http://localhost:8888/wordpress/test-file/Test-File/" rel="attachment wp-att-150">Test File</a>
CSS
a[rel~="attachment"] {
display: inline-block;
position: relative;
background: #EAE3EA;
height: 64px;
border-radius: 7px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
-khtml-border-radius: 7px;
border: 3px solid #515151;
display: table-cell;
text-align: center;
vertical-align: middle;
padding: 0 5px 0 47px;
font-weight: 400;
}
a[rel~="attachment"]::before {
content: '';
background: url(img/file.png) no-repeat;
width: 37px;
height: 48px;
top: 5px;
left: 5px;
position: absolute;
}
다른 브라우저에서도 작동합니까? –