ng-repeat로 일부 이미지를 나열하고 그 뒤에 일부 콘텐츠가있는 의사 클래스를 적용하고 싶습니다.
여기 내 바이올린이 있습니다 : https://jsfiddle.net/Noitidart/y7dxa6n8/11/
다음은 코드입니다.
<style>
body {background-color:steelblue;}
img::after { content: 'rawr'; size:100px; color:red; }
</style>
<div ng-app="myApp">
<div ng-controller="MyController as mc">
<img ng-repeat="aSrc in mc.arr" ng-src="{{aSrc}}"/>
</div>
</div>
제어 장치:
var myApp = angular.module('myApp', ['ngCookies']);
myApp.controller('MyController', [function($cookie) {
this.arr = ['https://jsfiddle.net/img/logo.png']
}]);
그러나 의사 클래스는 작동하지 않습니다. 이것은 매우 이상합니다.
각도의 문제가 아닙니다 ng-repeat
단지 확인 <img />
각도없이하고 확인::before
처럼
<img src="https://jsfiddle.net/img/logo.png">
img::after { content: 'rawr'; size:100px; color:red; }
그뿐만 지원하기 때문에 대부분의 브라우저의 작동하지 않는 ::before
, ::after
에 img
요소
이것을 확인
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다