【发布时间】:2020-11-24 02:19:18
【问题描述】:
我的网站适用于除平板电脑以外的所有设备。我使用的是 bootstrap 4,下面我附上了响应式设计的媒体查询。
@media (max-width: 1024px) {
div#about {
width: 100% !important;
margin-left: 0px !important;
}
}
@media (max-width: 1024px) {
div#about img {
width: 100% !important;
height: auto !important;
display: block !important;
margin: auto !important;
margin-bottom: 10px !important;
}
}
@media screen and (max-width: 1024px) {
div#about-section img {
margin-bottom: 50px !important;
width: 100% !important;
}
}
【问题讨论】:
-
如果您使用引导程序,我建议您不要创建自己的断点。使用它们的断点为您的网站创建一致的行为。
标签: html css twitter-bootstrap bootstrap-4 responsive-design