【发布时间】:2021-10-12 02:20:05
【问题描述】:
CSS 我用于样式:
@media (max-width: 576px) {
.bootomTab {
display: flex !important;
position: absolute;
bottom: 0;
height: 30px;
background-color: white;
border-top: 1px solid #e6ecf0;
flex-direction: row !important;
}
.bootomTab a {
flex-grow: 1;
padding: 0;
height: 0;
}
}
在我的 HTML 中,我使用引导断点 sm,根据引导程序 official doc,其尺寸≥576px:
<nav className="bootomTab d-none d-sm-flex col-sm-2 col-lg-3">
<div className="logo">
<a href="/home">
<img src="/twitter.png" alt="logo" />
</a>
</div>
<a href="/home">
<i className="fas fa-home"></i>
</a>
<a href="/search">
<i className="fas fa-search"></i>
</a>
<a href="/notifications">
<i className="fas fa-bell"></i>
</a>
<a href="/messages">
<i className="fas fa-envelope"></i>
</a>
<a href="/profile">
<i className="fas fa-user"></i>
</a>
<div className="mobileHide">
<a href="/signout">
<i className="fas fa-sign-out-alt"></i>
</a>
</div>
</nav>
【问题讨论】:
-
能否提供相关的HTML?我不确定我是否相信 bootom - 真的是这样吗?查看浏览器的开发工具以了解实际应用的 CSS 会有所帮助。
-
@AHaworth 编辑了问题。请检查。
标签: html css twitter-bootstrap media-queries