AngularJS实现鼠标移入显示,鼠标移出隐藏

2019-06-13 10:15:44 浏览数 (1)

很简单:

代码语言:javascript复制
<span ng-mouseenter="show = true" ng-mouseleave="show = false">
  Mouse over me.
</span>
<div ng-show="show">Hello!</div>

在Plunker中预览效果:

http://plnkr.co/edit/Ro80nR7HT7OGGPCXjz7E?p=preview

0 人点赞