How to inherit styles?

Hello, this problem
There is a block basic .main-block
Which inside has a child img element
and here I set the style to .main-block, respectively, are also applied to the img so here is how to cancel it?
HTML
<div class="main-block">
 <img src="path/image.png" alt="img">
</div>

CSS code
.main-block{
background:url('image.png');
 -webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
 filter: grayscale(100%);
}

img{
}

The fact that I want the background was black and white and the image itself is colored but does not work
June 10th 19 at 16:59
0 answer

Find more questions by tags CSS