2014-07-08 2 views
2

모든 브라우저에 대해 한 번 폴리머를 어떻게 스타일링 할 수 있습니까?스타일링 폴리머 - 모든 브라우저에 한 번

.leftSide img{ 
    float: left; 
    width: 100px; 
} 
content[select=".poster"]::content img { 
    float: left; 
    width: 100px; 
} 

HTML : :

content[select=".poster"]::content img 

이 작품 :

 <div class="leftSide"> 
       <content select=".poster"></content> 
     </div> 

이는 새로운 오페라와 크롬에서 작동 는 지금은 크롬/오페라와 파이어 폭스에 대한 두 개의 CSS 버전을 작성해야 firefox에서만 :

.leftSide img{ 
    float: left; 
    width: 100px; 
} 

코드를 작성하는 옵션이 있습니까?

답변

1

polyfill-next-selector을 사용해 보셨습니까? 그와 Documentation for it here

당신이 할 수있을 것입니다 :

polyfill-next-selector {content: ':host .leftSide img';} 
content[select=".poster"]::content img { 
    float: left; 
    width: 100px; 
}