简体   繁体   English

弹出框内的进度条

[英]Progress bar within popover

Using Bootstrap I inserted progress bar in a popover (I use it to show some statistics), but the problem is that the progress bar is going outside the border of the popover, this is my code: 使用Bootstrap我在进度条中插入了进度条(我用它来显示一些统计信息),但是问题是进度条超出了进度条的边界,这是我的代码:

 $("#sword").popover({ trigger: "hover" , placement: 'top', html:true, content: function() {return $("#ppf").html();} }); 
  <div class="hide" id="ppf"> <div class="container"> <h5 class="progress-label"> Others: </h5> <div class="progress" style=""> <div class="progress-bar" role="progressbar" aria-valuenow="66" aria-valuemin="0" aria-valuemax="100" style="width:66%">66%</div> </div> <br/><br/> </div></div> 

What I can do so that the progress bar stay inside the border of the popover, in addition to still responsive. 我可以做的是,使进度条除了保持响应性之外,还应位于弹出框的边界内。

you need to create the sword element then set ppf style="display:none;" 您需要创建剑元素,然后设置ppf style =“ display:none;”。

and thats it here is an example of your same code 多数民众赞成在这里是您的相同代码的示例

<div id="info" style="display:none;">
  <div class="container">
    <h5 class="progress-label"> Others: </h5>
    <div class="progress" style="">
      <div class="progress-bar" role="progressbar" aria-valuenow="66"
      aria-valuemin="0" aria-valuemax="100" style="width:66%">66%
      </div>
    </div><br/><br/>
  </div>
</div>

<button type="button" class="btn">
  Popover on right
</button>

Example working on JsFiddle 在JsFiddle上工作的示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM