gpt4 book ai didi

html - 如何使我的网站宽度完全适合 iphone 5?

转载 作者:太空宇宙 更新时间:2023-11-04 14:39:04 24 4
gpt4 key购买 nike

我正在为我的摄影爱好开发一个新网站。广告是 faspix.com 我已经让它适合我想要的笔记本电脑/台式机但是当我在 iPhone 上加载页面高度完全存在但宽度只有宽度时我遇到了使宽度适合我的 iPhone 的问题从左到右显示大约一半然后我必须向右滚动才能看到其余的宽度...我尝试了一堆不同的媒体查询但没有真正解决问题例如当我将 site_content 切换到最大宽度 100它只是缩小了 iPhone 上的容器。有人可以帮我解决 iPhone 上的宽度问题吗?谢谢

CSS:

media (max-device-width: 1024px) { /*IPad portrait AND netbooks, AND anything with smaller screen*/ /*make the design flexible if possible */ /*Structure your code thinking about all devices that go below*/ } 

@media (max-device-width: 640px) { /*Iphone portrait and smaller*/ }

media (max-device-width: 540px) { /*Smaller and smaller...*/ }

media (max-device-width: 320px) { /*IPhone portrait and smaller. You can probably stop on 320px*/ }

最佳答案

在标题中添加此代码!

<meta http-equiv="Content-type" name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">

关于html - 如何使我的网站宽度完全适合 iphone 5?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19794483/

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