+ 1
How to fit the image in html?
I want to fit an image in html document without repeating it continuosly when scrolling down or toward the right. I have tried many times but unable to fix it
4 Answers
+ 6
height: 100vh;
width: 100vw;
background-attachment: fixed;
background-size: cover;
background-image:url(Enter URL of image here);
+ 3
hi Ankit Meena if you dont mind showing your code for better understanding, you can use
position:fixed; to make the image stay at a position and background-repeat:none;
+ 2
Thanks
+ 2
Thanks now the problem is fixed
https://code.sololearn.com/W6B86x1r48wD/?ref=app