2017-03-29 2 views
0

각도 프로젝트에서 nth-of-type을 선택하려고하지만 모든 요소가 상위/래퍼를 가질 수는 없습니다. 이 [dashboard-functionbutton] 같은과 함께 "부모를"스타일을 할 수 있습니다,이 방법을 수행 할 수없는 경우각도 2 CSS 선택기

<dashboard-functionbutton _ngcontent-tub-48="" _nghost-tub-49="" ng-reflect-function-button-item="[object Object]"> 
<button _ngcontent-tub-49="" class="function-btn" ng-reflect-ng-class="[object Object]"></button> 
</dashboard-functionbutton> 

: 예 : i는 마크 업이 모든 세 번째 버튼을 얻으려면?

답변

0

CSS :

dashboard-functionbutton:nth-of-type(3n+0) > button { border: 1px solid red; }