首页 > 解决方案 > 改变popover angularjs的宽度

问题描述

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

问题

我的观点:

<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;
}

我已经尝试过这里的解决方案 UI Bootstrap Popover: change width but none 适用于我,我不知道我是否做得很好

我在这个页面上获取了我的弹出代码 http://angular-ui.github.io/bootstrap/

标签: cssangularjstwitter-bootstrappopover

解决方案


它可以添加!important到我的 CSS 中

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

推荐阅读