Answer the question
In order to leave comments, you need to log in
How not to load an image on mobile devices?
I know that you can use media spaces to hide pictures
@media screen and (max-width: 768px) {
img {
display: none;
}
}
#logo {
background-image: url('/images/my_image.png');
}
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
#logo {
background-image: url('/images/[email protected]');
background-size: 200px 100px;
}
}
Answer the question
In order to leave comments, you need to log in
Do not use img , but instead use div and set the background image in CSS via media or not.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question