如何使用CSS覆盖此渐变过滤器


How can I override this gradient filter using CSS?

我正试图摆脱/覆盖主页上图像的梯度过滤器,我正在使用这个子主题

我是新手,但这是我一直在编辑的代码:

.image-section {
background: -moz-linear-gradient(top,  rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.8) 80%, rgba(0,0,0,0.9) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0.2)), color-stop(30%,rgba(0,0,0,0.5)), color-stop(80%,rgba(0,0,0,0.8)), color-stop(100%,rgba(0,0,0,0.9)));
background: -webkit-linear-gradient(top,  rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.5) 30%,rgba(0,0,0,0.8) 80%,rgba(0,0,0,0.9) 100%);
background: -o-linear-gradient(top,  rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.5) 30%,rgba(0,0,0,0.8) 80%,rgba(0,0,0,0.9) 100%);
background: -ms-linear-gradient(top,  rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.5) 30%,rgba(0,0,0,0.8) 80%,rgba(0,0,0,0.9) 100%);
background: linear-gradient(to bottom,  rgba(0,0,0,0.2) 0%,rgba(0,0,0,0.5) 30%,rgba(0,0,0,0.8) 80%,rgba(0,0,0,0.9) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#33000000', endColorstr='#e6000000',GradientType=0 );
display: table;
overflow: hidden;
table-layout: fixed;
width: 100%;
}

我试着把它改成:

.image-section {
background: none;
background-color: transparent;
display: table;
overflow: hidden;
table-layout: fixed;
width: 100%;
}

我甚至试过"!"重要";,但似乎没有什么能修复它。这个php(在customize.php中)与它有关吗?

global $wp_customize;
$images = apply_filters( 'altitude_images', array( '1', '3', '5', '7' ) );

我看了一眼这个页面。您无法覆盖背景的原因是它使用了媒体查询:@media all {}

正如强大的@BoltClock所建议的那样,媒体没有增加特定性,因此或多或少可以快速解决:

css

div .image-section {
    background: none;
}

将添加特定性,因此如果最后一条规则不起作用,则可能有一些javascript或php在应用css后应用该类。