gpt4 book ai didi

html - 响应图像调整大小

转载 作者:行者123 更新时间:2023-11-28 05:51:40 25 4
gpt4 key购买 nike

我有这样的 css 代码,宽度小于 479px

@media (min-width: 320px) and (max-width: 479px) {
.pi-hidden-2xsx-only {
max-width: 5px;
max-height: 5px;
}

我的图像源使用这样的类

<a href="index.html"><img src="img/logo.png" alt="" class="pi-hidden-2xsx-only"></a>

为什么当我在我的图像源中应用这个类时它不起作用?当我的移动设备小于宽度时,我的图像应该自动调整大小以适应我应用的规则。

最佳答案

I have the css Code like this for width less than 320px

媒体查询应该是:

@media (max-width: 320px) {
.pi-hidden-2xsx-only{
/* your css */
}
}

关于html - 响应图像调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37291433/

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