angularjs material 的工具提示显示左右方向的不同位置
Tooltip of angularjs material shows different position with right and left direction
我使用 AngularJs Material 的工具提示,而我 运行 出现了一种奇怪的行为 - 当我将方向设置为正确时 - 然后它显示的工具提示的间距与左方向
对:
左:
如您所见 - 右边的方向比左边的方向有更多的余量....
我想知道如何将它们设置为等间距(我更喜欢右边距...)
我试过在图标前后添加工具提示 - 只是为了测试 - 但没有奏效。
<md-button class="md-fab">
<md-tooltip ng-show="isRTL" md-direction="{{demo.tipDirection}}">
Insert Drive
</md-tooltip>
<md-icon md-svg-src="img/icons/ic_insert_drive_file_24px.svg">
<md-tooltip ng-show="!isRTL" md-direction="{{demo.tipDirection}}">
Insert Drive
</md-tooltip>
</md-icon>
</md-button>
B.t.w - 同样的错误出现在 Angular Material 工具提示 example
这是一个Example
您可以覆盖工具提示 css。
试试这个:
.md-tooltip.md-origin-left {
margin: 0 15px 0 0;
}
我使用 AngularJs Material 的工具提示,而我 运行 出现了一种奇怪的行为 - 当我将方向设置为正确时 - 然后它显示的工具提示的间距与左方向
对:
左:
如您所见 - 右边的方向比左边的方向有更多的余量.... 我想知道如何将它们设置为等间距(我更喜欢右边距...)
我试过在图标前后添加工具提示 - 只是为了测试 - 但没有奏效。
<md-button class="md-fab">
<md-tooltip ng-show="isRTL" md-direction="{{demo.tipDirection}}">
Insert Drive
</md-tooltip>
<md-icon md-svg-src="img/icons/ic_insert_drive_file_24px.svg">
<md-tooltip ng-show="!isRTL" md-direction="{{demo.tipDirection}}">
Insert Drive
</md-tooltip>
</md-icon>
</md-button>
B.t.w - 同样的错误出现在 Angular Material 工具提示 example
这是一个Example
您可以覆盖工具提示 css。
试试这个:
.md-tooltip.md-origin-left {
margin: 0 15px 0 0;
}