问题是我已经将线性渐变与背景图像捆绑在一起。渐变在图像上放置黑色覆盖。有什么方法可以删除渐变吗?图像应该保持不变。
background:linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5)), url( http://localhost/wordpressfree/wp-content/uploads/2016/08/block1.jpg );
我尝试了背景色:无!重要;还有更多的房产,但它不起作用。如果有人知道如何处理这个特定问题,我将不胜感激。谷歌没有帮助。
编辑:这是在客户端网站上,所以我无法编辑样式表。我需要一种方法来覆盖渐变部分。并且用户也可以改变背景图像(不能是硬代码图像)。我只能为用户提供将在页面顶部添加的CSS代码。所以压倒一切是我最好的选择。
答案 0 :(得分:4)
只需删除linear-gradient
部分。
background: url(http://localhost/wordpressfree/wp-content/uploads/2016/08/block1.jpg);
答案 1 :(得分:0)
background: url(http://localhost/wordpressfree/wp-content/uploads/2016/08/block1.jpg);
或:
background-image: url(../images/help/community.svg);
background-repeat: no-repeat;
background-position: center center;