首页 > 解决方案 > md-tooltip 不适用于选取框

问题描述

我在 md-button 中使用 md-tooltip 并使用 marquee 显示按钮的滚动标签。但是 md-tooltip 只显示一秒钟,然后当我将鼠标移到 md 按钮上时消失。我注意到,当我删除选取框代码时,md-tooltip 会正确显示。也尝试使用 md-z-index、md-visible 但没有帮助。所有控件都添加到部分中。

<section layout="row" layout-sm="column" layout-align="center center" layout-wrap>
    <div ng-repeat="mybutton in allbuttons">
        <md-button class="md-fab">
          <div >
              <md-tooltip md-direction="top" md-visible="true">{{mybutton.buttontooltip}}</md-tooltip>
              <img ng-src={{mybutton.imagesource}} style="width:50px" />
          </div>
      </md-button>
      <div class="buttonLabel">
          <marquee scrollamount="1" style="float:left; font-size: 12px; width:70px; color: white; padding-right: 5em">
            <div>
                {{buttonlabel}}
            </div>  
          </marquee>
      </div>
    </div>
</section> 

我的类 buttonLabel 的 CSS 如下。

.buttonLabel {
        background-color: #080808;
            color:#EEE5E5;
            bottom: 2px;
            left: 520px;
            margin: 10px;
    } 

采摘器链接如下。如果您删除选取框,它将正常工作。

https://codepen.io/naddy1/pen/eKbGVN

请让我知道我是否以正确的方式进行操作?

标签: angularjsangularjs-material

解决方案


推荐阅读