【问题标题】:UI-Bootstrap, adjust modal dimensions according to contained imageUI-Bootstrap,根据包含的图像调整模态尺寸
【发布时间】:2017-10-26 07:27:29
【问题描述】:

我正在使用基于组件的架构,并希望显示调整为图像高度和宽度的引导模式。

大多数论坛建议使用百分比的高度和宽度,但这无济于事,因为图像大小可能会有所不同。

有人做到了吗?

【问题讨论】:

    标签: angularjs angular-ui-bootstrap angular-bootstrap


    【解决方案1】:

    有一个简单的解决方案。首先你需要覆盖模态的width 属性(高度是自动调整的,应该不是问题),模态窗口使用.modal-dialog 类,所以使用!importent 覆盖宽度

    .modal-dialog {
        width: fit-content !important;
    }
    

    content-box 会根据元素包含的内容调整宽度。

    here's a demo

    【讨论】:

      猜你喜欢
      • 2012-01-27
      • 2010-10-22
      • 2015-03-12
      • 1970-01-01
      • 1970-01-01
      • 2014-05-13
      • 1970-01-01
      • 2014-12-06
      • 1970-01-01
      相关资源
      最近更新 更多