gpt4 book ai didi

html - 如何设置适用于所有分辨率屏幕的图像大小?

转载 作者:行者123 更新时间:2023-11-28 07:17:29 25 4
gpt4 key购买 nike

我如何制作像 this 这样的图像?我的图像无法在更大的桌面屏幕上显示。这是我的图像大小代码:

style="width:100%;height:100%;"

最佳答案

你能做的就是,你可以给<img />以下 CSS:

position: fixed;
z-index: 1;
width: 100%;
height: 100%;
left: 0;
top: 0;

片段

img {
position: fixed;
z-index: 1;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
<img src="http://lorempixel.com/400/400" />

关于html - 如何设置适用于所有分辨率屏幕的图像大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32272049/

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