工具提示未显示在相应的nob上

时间:2015-01-05 05:45:04

标签: javascript css angularjs html5

'我的用户界面遇到了问题,我向下滚动后工具提示没有显示不适当的nob。

<div ng-init="hideTooltip[$index]=1" ng-click="toggleTooltip($index, $event);" style="float:right;margin-top:7px" class="menu-toggle-black" ng-show="hideTooltip[$index]==1&&isNotAdmin(permission)"> 
    <ul class="menu-tooltip margin-left-140px" ng-show="showTooltip[$index] == 1">
        <li ng-apply-privilege="VRM_ADD_PERMISSIONS" class="logout" ng-click="editButton($index, permission);"><span><a translate="usermanagement.view.EDIT"></a></span></li>
        <li ng-apply-privilege="VRM_DELETE_PERMISSIONS" class="logout" ng-click="deleteButton($index);"><span><a translate="usermanagement.view.DELETE"></a></span></li>
    </ul>
</div>

<style>
    .menu-tooltip{position:fixed;}
</style>

1 个答案:

答案 0 :(得分:0)

当您将工具提示位置设置为固定时,页面滚动时不会移动

您应该设置容器位置相对,并设置绝对位置。

如下所示

.menu-toggle-black {
    position:relative;
 }
 .menu-tooltip{
   position:absolute;
   top:0; /* or positive or negative value you need.*/
   left:100%; /* or positive or negative value you need.*/
  }
相关问题