I want make a responsive background with image when I used background-size: contain;
in small screen that was awesome but in large screen my image is too large. how I can Determine maximum width and height just using HTML and CSS.
I want make a responsive background with image when I used background-size: contain;
in small screen that was awesome but in large screen my image is too large. how I can Determine maximum width and height just using HTML and CSS.
2
Answers
You can use a media query to switch
background-size
depending on screen size. For example, if your image is 640px wide:You can use media queries in your css.