response.js icon indicating copy to clipboard operation
response.js copied to clipboard

Background Images

Open jsanglier opened this issue 10 years ago • 2 comments

Hi

Just for interest, is there anyway of using this for background images?

Joss

jsanglier avatar Jan 27 '15 09:01 jsanglier

It's not really designed for use with background images. You can use normal CSS media queries to set different background images at different breakpoints as needed.

ryanve avatar Jan 29 '15 16:01 ryanve

Thanks Ryan. It was just in a particular scenario where the client can chose the background for a div in the CMS, but I want to use different sizes of that image for different devices. That means that in its simplest form, the background image is loaded using inline styles.

I can solve it by using JQuery to select the correct image depending on device width, but it struck me that your script is halfway to doing that already.

Joss

jsanglier avatar Jan 29 '15 16:01 jsanglier