15th January 2019
CSS

Cute little CSS bug in Chrome

Okay, it’ll be quick.

Chrome: version 71

HTML:

<a href=""><img src="unknown.jpg"></a>

CSS:

a {
opacity: 0.5
}

img {
display: block;
}

That’s all you need.

Obviously it is a bug. There is no way it should work like that, right? I’ve checked in the superior browser—Edge, but it looks normal there.

Funny, huh?

Remember: this is a bug. Don’t treat is as a feature (even if it could actually be helpful).

3

Leave a Reply

Your email address will not be published. Required fields are marked *