gpt4 book ai didi

css - 从 id/class 中删除图像的响应

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

我想知道如何从特定的 div 中删除图像的响应性。我没有使用任何框架,只是一个响应的普通 CSS。

这是所有图片标签的代码:

img { max-width: 100%; height: auto; }

有些我不希望这些样式出现在特定的 Div ID 或类上。

我该怎么做?

最佳答案

使用各个样式的默认值重置或删除之前设置的 CSS试试这个 CSS:

#specificDiv img {
max-width : none;
height : auto;}

Reference

(更新): 添加了 img 标签...根据问题需要...

关于css - 从 id/class 中删除图像的响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28830635/

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