【问题标题】:How to change the width of bootstrap popover如何更改引导弹出框的宽度
【发布时间】:2016-10-03 10:30:52
【问题描述】:

我有一列的尺寸是

width:30pxheight:25px

如果触发弹出框,该列只有一个按钮,它的宽度缩放到列的宽度...有人知道如何增加弹出框的宽度吗?

width:100pxheight:50

我使用了以下css代码

.popover{
    widht:100px;
    height:50px;
    overflow:visible;
}

【问题讨论】:

  • 您能分享一个工作示例吗?
  • 对不起,我没有!
  • 我可以尝试让它变得简单一点,我的列尺寸是 widht:30px height:25px。所以我的弹出框尺寸也将相同(宽度:30px 高度:25px)。但我想将尺寸更改为宽度:100px;高度:50px;
  • 然后更改列的大小。
  • 我无法更改设计

标签: html css twitter-bootstrap bootstrap-popover


【解决方案1】:

我在 Bootstrap 4 Beta 版上测试的一个解决方案:

.popover {
        min-width: 30em !important;
}

【讨论】:

    【解决方案2】:

    您想更改与弹出框一起使用的容器。

    这可以通过 Javsascript 来完成,您可以在其中初始化指定元素上的弹出框容器。

    // where 'body' is the container you want to contain the popover within
    $('[data-toggle="popover"]').popover({
    container: 'body' });
    

    【讨论】:

      猜你喜欢
      • 2019-12-31
      • 1970-01-01
      • 2017-09-14
      • 1970-01-01
      • 1970-01-01
      • 2018-08-21
      • 2019-06-28
      • 1970-01-01
      • 2016-11-15
      相关资源
      最近更新 更多