Sas*_*vic 2 html css iphone width
我正在为我的摄影爱好开发一个新网站。广告是 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*/ }
Run Code Online (Sandbox Code Playgroud)
将此代码添加到标题中!
<meta http-equiv="Content-type" name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6873 次 |
| 最近记录: |