【问题标题】:Change the width of popover angularjs改变popover angularjs的宽度
【发布时间】:2019-12-08 10:46:00
【问题描述】:

我有一个问题,我无法更改弹出框的宽度,我需要弹出框的宽度以适合其内容

Problem

我的看法:

<button uib-popover-template="'excelTools.html'" popover-placement="bottom"
        popover-title="" type="button"
        class="btn btn-default pull-right">Importar</button>

<script type="text/ng-template" id="excelTools.html">
  <div class="container-fluid">
    <div class="text-element content-element circles-list">
      <ol>
        <li>Create a new Canva account to get started with your own Organizational Chart design.</li>
        <li><span style="font-weight: 400">Choose a template and click on the text boxes to start customizing your chart. </span></li>
        <li><span style="font-weight: 400">Customize details like colors and fonts.</span></li>
        <li>Choose from our stunning range of graph elements, like frames, s, like frames, s, like frames, s, like frames, s, like frames, s, like frames, shapes and lines.</li>
        <li>Save and share.</li>
      </ol>
    </div>
  </div>
</script>

我的 .css:

.content-element{
    margin:50px 0 0 50px;
}
.circles-list ol {
    list-style-type: none;
    margin-left: 1.25em;
    padding-left: 2.5em;
    counter-reset: li-counter;
    border-left: 1px solid #00c4cc;
    position: relative;
}

.circles-list ol > li {
    position: relative;
    margin-bottom: 3.125em;
    clear: both;
}

.circles-list ol > li:before {
    position: absolute;
    top: -0.5em;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-size: 1em;
    left: -3.75em;
    width: 2.25em;
    height: 2.25em;
    line-height: 2.25em;
    text-align: center;
    z-index: 9;
    color: #00c4cc;
    border: 2px solid #00c4cc;
    border-radius: 50%;
    content: counter(li-counter);
    background-color: #ebeced;
    counter-increment: li-counter;
}

我已经尝试了解决方案hereUI Bootstrap Popover: change width,但没有一个适合我,我不知道我是否做得很好

我在 page http://angular-ui.github.io/bootstrap/ 上使用了我的弹出框代码

【问题讨论】:

  • 检查开发者控制台中的元素。使用计算样式窗格确定要使用的适当 CSS。

标签: css angularjs twitter-bootstrap popover


【解决方案1】:

在我的 CSS 中添加 !important 有效

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

【讨论】:

    猜你喜欢
    • 2014-04-11
    • 2017-10-15
    • 2015-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多