gpt4 book ai didi

html - CSS Media Query 可以和 bootstrap sizing 一起使用吗?

转载 作者:太空宇宙 更新时间:2023-11-03 22:47:45 24 4
gpt4 key购买 nike

我正在重构一个页面以使用媒体查询而不是为每个可能的大小编写,我的问题是,当你使用媒体查询时,是否可以设置一个单一的大小,然后它像 Bootstrap 一样工作,在哪里设置XS 会影响 sm、md、lg 还是必须在每个级别都定义?

例子:

 @media screen and (max-width:767px){
.smallDevices {
padding-bottom: 30px;
margin-bottom: 30px;
}

.ScreenStyle {
height: 914px;
margin-bottom: 10px;
}

.smallFixFooter {
margin-bottom: 10px;
}
}

最佳答案

是的,您可以为 media queries 设置单一尺寸

有点像

@media (min-width: 123px) {}

这将适用于屏幕尺寸为 123px 或 greiter 的情况

关于html - CSS Media Query 可以和 bootstrap sizing 一起使用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41445600/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com