C
C
Cobret2020-05-27 09:03:50
CMS
Cobret, 2020-05-27 09:03:50

How to set background-image with media queries for the engine (CMS)?

How to use the site engine or CMS to prescribe the background for the block (picture)? I'm learning layout and now I'm writing a background image for blocks using CSS with media queries for good display on different screens and browsers (webp/retina/jpg/png). All code is not written inline, but in CSS.

In this case, what is the best way to set the background if later this layout will be used on the back-end and with the CMS? Are there any solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Nikiforov, 2020-05-27
@squitcher

Don't use a bunch of images, nobody does that.
If you really want to - check webp support through the server - and give webp, the rest is all in css

X
xmoonlight, 2020-05-27
@xmoonlight

General css and several separate css for segmented screen resolutions. Each segment - loads its css via @media @include.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question