Answer the question
In order to leave comments, you need to log in
How to apply specific styles to an image with transparency?
The task is simple, determine that the image has transparent pixels and remove the border from it.
I decided to illustrate with code:
img {border: solid 1px red}
img искомый мистический селектор {border: none}
Answer the question
In order to leave comments, you need to log in
css has no idea if the image has transparency. You can of course catch on to the file extension, but png and gif do not guarantee transparency. and talk about its possibilities. Is it only about jpg that it can be argued that it is not there.
I think you are solving the problem in the wrong way. This should be done in js.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question