html - 整个页面具有一个图像原始颜色的样式

标签 html css

我有一个整个页面都采用样式的网页

<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/

相关文章:

html - Vuetify <v-data-table> 自定义 <th> header

html - 使用 bash 从 html 表中提取单元格值

html - 基于 CSS 的网站无法在 Internet Explorer 上运行

javascript - HTML 表格很大时响应缓慢

带有图形/codepen 的 CSS 后续转换

jquery - 单级联下拉(替代 ASP.net 中使用的)

css - 如果 CSS 选择器包含地址元素,Firefox 拒绝样式元素

html - 无法在 PowerShell 中触发单击事件

html - 显示 : flex won't render properly in IE11

html - CSS 子菜单不起作用