gpt4 book ai didi

html - 在移动设备上删除对象

转载 作者:行者123 更新时间:2023-11-28 16:02:32 25 4
gpt4 key购买 nike

对于我的站点,我有一个登录屏幕,底部有一个页脚。该页面针对桌面显示器进行了优化,并且网站本身已经针对 PC 和移动设备进行了优化,因此我不想经历创建新移动版本的麻烦。

我不太擅长使用脚本,所以我在这里问这个问题:我可以制作一个脚本,在屏幕尺寸小于 400 像素时删除页脚吗?

这里有一些问题的照片,也许你们可以给我一个解决方案?提前致谢!

Normal desktop view

When on mobile, the footer covers it -> I want the footer removed

最佳答案

使用 CSS @media:

/* From 0 to 992px Device Width */
@media (max-width: 992px) {

#footer {
display: none;
// Other styles here
}

}

关于html - 在移动设备上删除对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39819510/

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