gpt4 book ai didi

css - 图像不会显示 - CSS

转载 作者:太空宇宙 更新时间:2023-11-04 04:29:41 25 4
gpt4 key购买 nike

我遇到了一个奇怪的问题,即移动/桌面设备的 CSS 错误。

在移动设备上,我的一个类(class)的图片不会显示,但它的内容区域会显示。

在桌面上,将显示我的一个类(class)的图像,包括它的内容区域。

这就是我创建图像的方式:

<div class="image">
<img src="images/image.jpg" alt="" />
</div>

这就是我在 mobile.css 文件中所做的:

.image {

width: 471px;
height: 513px;
float: left;
}

在我的另一个文件(用于 iPhone)中,我没有显示图像,所以我这样做:

.image {
display: none;
}

这会导致我的问题吗?

最佳答案

@media screen and (max-width: 480px) {
.image {
display : none;
}
}

关于css - 图像不会显示 - CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17529898/

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