css - 改变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 适用于我,我不知道我是否做得很好
解决方案
它可以添加!important
到我的 CSS 中
.popover {
width: 500px !important;
max-width:500px !important;
}
推荐阅读
- python - 如何在 Pandas 中拆分没有分隔符的列
- bash - BASH 多目录重命名失败
- typescript - 为什么 TypeScript 允许 1 + '1' = '11'?它背后的设计理念是什么?
- c++ - '!' 对绑定成员函数表达式的非法操作
- javascript - 按属性值打字稿对对象数组进行排序
- java - 是否可以在 Android Studio 上对 MaterialSearchBar 进行单元测试?
- python - Networkx 中 DiGraph 中继任者的继任者列表
- c++ - 如何在 C++ 中的类构造函数中使用线程?
- javascript - 重定向时无法在laravel中设置属性'onsubmit'为null
- excel - RoundUp 产生意外结果