我有一个整个页面都采用样式的网页
<div class="w3-sand w3-grayscale w3-large">
如何使 xxx 图像显示原始颜色而不是 w3 灰度?
<img src="xxx">
最佳答案
我认为你是初学者:
W3Schools 有自己的样式表,让我解释一下你是 w3-sand,w3-large,w3-greyscale
.w3-sand, .w3-hover-sand:hover {
color: #000!important;
background-color: #fdf5e6!important;
}
.w3-large {
font-size: 18px!important;
}
.w3-greyscale, .w3-grayscale {
filter: grayscale(75%); /* this is the line of code applying the filter */
}
所以这些是那里提到的特定类的样式......
要从 greyscalse
中移除图像,您可以使用 remove it from the parent 或者您可以从 parent div
中移除 greyscalse
样式。因为它是在子元素上应用效果的人。因此,只需分解您的代码或从父元素中删除样式即可。
关于html - 整个页面具有一个图像原始颜色的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48376189/