O
O
oe24y2018-09-12 12:55:40
HTML
oe24y, 2018-09-12 12:55:40

Bootstrap: How to display different images depending on grid?

How to do it right. The option below works, but how to do it correctly, without loading images that are not for the current grid?

<img class="banner visible-md visible-lg" src="banner_md.png" />
<img class="banner visible-sm visible-xs" src="banner_xs.png" />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BarryHAllen, 2018-09-12
@BarryHAllen

Offhand:
Option a) css - background-image and media
Option b) javascript - substitute the src variable and hang the event on resize

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question