css - 在 Bootstrap 中编辑警报的宽度

标签 css html twitter-bootstrap

我想减小警报的大小。我试过:

.alert{
    align-content: center;
    width: 20%;
}

但是不行,我也试过缩小整个容器的宽度。我也尝试过将警报设置为他的内容的宽度,但也没有用:

.alert{
    display:inline-block;
}

我的提醒包含许多这样的链接:

<a href="website" id="links" target="_blank">/website1</a> 

最佳答案

尝试使用

.alert{
    align-content: center;
    width: 20% !important;
}

关于css - 在 Bootstrap 中编辑警报的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31532063/

相关文章:

html - 如何使此 html 代码和 css 出现在移动应用程序中?

html - 如何使用 css 更改选项卡大小?

html - CSS 定位 div 在其他 div 中

javascript - bootstrap data-dismiss ="alert"——并重定向其他页面

javascript - 如何从 %(percentage) 中取反 px?

css - 使用 html/css 重叠行

javascript - Bootstrap 模态框不会启动

javascript - 隐藏 div 并突出显示选定的缩略图以激活

html - 如何在同一 TD 中垂直对齐顶部和垂直对齐中间

html - 如何在 Bootstrap 网格系统中将图像高度与其旁边的 div 对齐?