O
O
Optimus2016-11-23 13:32:14
css
Optimus, 2016-11-23 13:32:14

How to display a different image on mobile?

The site has a picture in the center of the page, but if the user comes from a mobile phone, a different picture is needed. On the server side, through the definition of mobile phones, I don’t want to draw a different conclusion.
Can this be done in css?
But in media queries, you can only change the background image, or can you somehow get close to the usual img tag?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2016-11-23
Pyan @marrk2

srcset is exactly what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question