html - Bootstrap 3 下拉菜单不适合内容的宽度

标签 html css twitter-bootstrap twitter-bootstrap-3

<分区>


关闭 8 年前

我的下拉菜单有这个小问题。 我需要宽度适合内容里面的内容

在我的 CSS 中,我正在使用

width: -ms-max-content;
width: -webkit-max-content;
width: -moz-max-content;
width: -o-max-content;

但它在 IE 上不起作用,是否有其他方法可以做到这一点? 谢谢

enter image description here

最佳答案

你能试试这个代码吗?

ul li a{
   white-space:normal;
}

关于html - Bootstrap 3 下拉菜单不适合内容的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25767923/

上一篇:javascript - jquery 打印区域打印 css 颜色

下一篇:html - CSS 旋转文本但保持垂直对齐

相关文章:

html - 页脚中的文本填充粘在顶部

html - 长描述左侧的可能图像

css - 为什么我的定制节点似乎没有响应修改

html - 在 Twitter Bootstrap 的导航按钮之间放置居中文本

css - 给列容器的宽度

javascript - 无法让 Jquery 选项卡在简单侧边栏 Bootstrap 模板中工作

html - 使文本元素彼此保持一致的CSS规则?

javascript - 如何扩展元素但保持其位置?

html - 基于屏幕宽度的可变列数

css - 媒体查询隐藏/显示 div