标签:style ar for on html htm as tt js
图片旋转基于 CSS:transform:rotate(**deg)
实现,Angular 用于动态绑定 deg 数:
controller:(其实可以省略)
$scope.img = {src:"xxx.png", rotate=0};
HTML:
<button ng-click="img.rotate=img.rotate+90">向右转</button> <button ng-click="img.rotate=img.rotate-90">向左转</button> <img ng-src="img.src" style="transform:rotate({{img.rotate}}deg);">
标签:style ar for on html htm as tt js
原文地址:http://my.oschina.net/lionets/blog/331785