如何在bootstrap中设置工具提示宽度自动调整

时间:2017-06-02 14:07:15

标签: twitter-bootstrap tooltip width

我使用简单的bootstrap工具提示,但内容太长plz帮助我如何在bootstap中调整工具提示的自动宽度

这是我的代码`

<script>
$(document).ready(function(){
    $('[data-toggle="tooltip"]').tooltip(); 
});
</script>
<i class="fa fa-info-circle" aria-hidden="true" data-toggle="tooltip" data-placement="top" title="Enter your emergency point of contact who may be a person in or outside of the United States, e.g., a family member, friend, or business associate.
In the Family Name field, enter your emergency contact�s family name. You must complete this field to complete the application. If you have no emergency contact, enter UNKNOWN.
In the First (Given) Name field, enter the emergency contact first name. You must complete this field to complete the application. If you have no emergency contact (or your contact has only one name), enter UNKNOWN."></i>

`

1 个答案:

答案 0 :(得分:0)

在bootstrap 4.1中,您可以修改.tooltip-inner类的max-width值,例如:

.tooltip-inner {
  max-width: 500px !important;
}