Back

css - bootstrap , pop 内容的宽度,如何设置

发布时间: 2021-04-17 00:52:00

参考:https://stackoverflow.com/questions/19448902/changing-the-width-of-bootstrap-popover

以下3选一

1. 在HTML声明中:  data-container='body'

<i class='fa fa-question-circle' data-toggle='popover'
data-trigger='hover'
data-container='body'
title='说明' data-content='输入用户的id, 无论该用户是买方还是卖方,都会在下面的列表中出现'></i>

2. 在css 中:

.popover{
max-width: 100%; /* Max Width of the popover (depending on the container!) */
}

3. 或者在js调用中:

$('[data-toggle="popover"]').popover({
container: 'body'
});

Back