2014-12-10 2 views
1

이 스타일을 사용하여 라디오 버튼을 스타일링하면 파이어 폭스에서는 잘 작동하지만 크롬에서는 제대로 작동하지 않습니다. 경고는 라디오를 클릭 한 후 작동하지만 스타일이스타일 라디오는 파이어 폭스에서 작동하지만 크롬에서는 작동하지 않습니다.

http://jsfiddle.net/c2veopa3/2/

.example{ 
margin-bottom : 1.5em; 
} 

input[type=radio ]:not(old){ 
width : 28px; 
margin : 0; 
padding : 0; 
opacity : 0; 
} 

input[type=radio ]:not(old) + label{ 
    display  : inline-block; 
    margin-left : -28px; 
    padding-left : 28px; 
    background : url('http://mawk3y.net/cards/checks.png') no-repeat 0 0; 
    line-height : 24px; 
} 

input[type=radio]:not(old):checked + label{ 
background-position : 0 -48px; 
} 
+0

가의 목적은 무엇인가) 귀하의': (이전)'코드가 아닌가? 아무것도하지 않습니다. – im1dermike

답변

3

그것은 사방이 같은 작업을해야 변경되지 않습니다 http://jsfiddle.net/c2veopa3/5/

input[type=radio] { 
    display: none; 
} 
input[type=radio] + label:before{ 
    content: ''; 
    width: 24px; 
    height:24px; 
    margin: 0; 
    padding: 0; 
    display: inline-block; 
    vertical-align: middle; 
    background: url('http://mawk3y.net/cards/checks.png') no-repeat; 
    background-position: 0 0; 
} 

input[type=radio]:checked + label:before{ 
    background-position : 0 -48px; 
} 
+0

아직 (Chrome에서) – im1dermike

+0

크롬에서 테스트 한 결과 작동하지 않음 –

+0

잘못된 링크, 죄송합니다. 여기에 좋은 것이 있습니다. http://jsfiddle.net/c2veopa3/5/ –

관련 문제