gpt4 book ai didi

html - 我的图像在手机上非常小 - 320 +

转载 作者:行者123 更新时间:2023-11-28 19:13:42 25 4
gpt4 key购买 nike

我有一张图片过去显示正常,screenshot of small image ,但现在它变得非常小,而以前它曾经用来填满手机屏幕。这是 CSS:

img {
max-width: 100%; height: auto; text-align: center; box-shadow: 2px 2px 5px 1px #888;
}
a img {
list-style-type: none; text-align: center;
}

图像本身的宽度为 320 像素,因此您会认为它适合,但它非常小,这是我的屏幕截图。 map 图片那个小,另一个还可以

谁能告诉我我做错了什么?

最佳答案

设置 HTML 视口(viewport)以解决此问题。这会指示移动设备使用特定的缩放方法,使图像以正确的尺寸显示。

<head>
<!-- Other head elements here -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

关于html - 我的图像在手机上非常小 - 320 +,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58828382/

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