popover-inner 的 Bootstrap 弹出框宽度 [英] Bootstrap popover width for popover-inner

查看:41
本文介绍了popover-inner 的 Bootstrap 弹出框宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望 Bootstrap Popover 更宽一些.我读到这应该有效:

I would like the have a Bootstrap Popover be wider. I read that this should work:

.popover-inner a {
   width: 600px;
}

但是,浏览器控制台仍然显示带有上述代码的自动.很难描述.截图如下:

But, the browser console still shows auto with the above code. Hard to describe. Here is a snapshot:

推荐答案

根据我在 bootstrap.css 文件中的内容,默认值为 max-width 属性.

Based off of what I have in my bootstrap.css file, the default is a max-width property.

我用这个

.popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1010;
  display: none;
  max-width: 600px;
  padding: 1px;
  text-align: left;
  white-space: normal;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.2);
  -webkit-border-radius: 6px;
     -moz-border-radius: 6px;
          border-radius: 6px;
  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
     -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  -webkit-background-clip: padding-box;
     -moz-background-clip: padding;
          background-clip: padding-box;
}

它完全按照您的预期工作.

and it works exactly how you intended it to.

我的 bootstrap.css 文件根本不包含 popover-inner a css 选择器

My bootstrap.css files does not contain a popover-inner a css selector at all though

这篇关于popover-inner 的 Bootstrap 弹出框宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆