gpt4 book ai didi

css - 显示 : none doesn't work on mobile

转载 作者:行者123 更新时间:2023-11-28 02:00:53 26 4
gpt4 key购买 nike

我在移动设备上遇到显示属性问题。显示:无根本不起作用。我正在使用SASS。这是我的代码:

main {
display: none;
}

@media(min-width: $mobile-breakpoint) {
main {
height: 800px;
display: flex;
background-color: inherit;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
background-attachment: fixed;
background-image: url("./images/main.jpg");
}
}

最佳答案

在移动断点内使用display: none。示例:

@media(min-width: $mobile-breakpoint) {
main {
height: 800px;
display: none;
background-color: inherit;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
background-attachment: fixed;
background-image: url("./images/main.jpg");
}
}

关于css - 显示 : none doesn't work on mobile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49334741/

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