增加工具提示字符限制 - md-angular工具提示

时间:2015-05-05 18:14:51

标签: angularjs material-design angular-material

好吧,

我正在尝试使用角度材质设计工具提示指令,但由于我的工具提示消息大小,我面临一个问题,即完全显示。

我试着查看md存储库,但无法找到如何配置它

这是我正在尝试的代码:

<md-content >
  <md-button class="badge-blue">
    <span>?</span>
      <md-tooltip>
      This is the tootip message that i need to see, without ... 
    </md-tooltip>
  </md-button>
<md-content>

内容和按钮样式将宽度设置为100%。

使用上面的信息,我只能看到:“这是我发送的信息......”

我非常感谢任何帮助。谢谢!

3 个答案:

答案 0 :(得分:4)

您可以简单地调整/覆盖样式表:

HTML:

<md-content >
  <md-button class="badge-blue">
    <span>?</span>
      <md-tooltip class="large">
      This is the tootip message that i need to see, without ... 
    </md-tooltip>
  </md-button>
<md-content>

的CSS:

md-tooltip.large .md-content {
    max-width: 500px; // Or whatever you need.
}

http://codepen.io/anon/pen/aOvWGb

答案 1 :(得分:1)

这是你暂时可以拥有的最大尺寸,已经有人要求在角度材料上进行此操作。

Make md-tooltip width a bit larger

答案 2 :(得分:0)

我看到的解决方案只会使工具提示更长但仍在一条线上。 我更喜欢覆盖css上的空格:

md-tooltip .md-content{

  white-space: inherit;

}
相关问题