<div class="col-md-12 itemtypebox" ng-class="{'activedbackgroundcolor':showtimes}" ng-mouseenter="showtimes = true" ng-mouseleave="showtimes = false">
<span class="itemtype col-md-10" ng-bind="item.name" ng-class="{'colorfff':showtimes}"></span>
<span class="itemtype col-md-2"><i class="fa fa-times colorfff" ng-show="showtimes"></i></span>
</div>
主要使用了ng-mouseenter與 ng-mouseleave 表示鼠標的移入移出
angular 鼠標移入移開元素顯示或隱藏
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.