CSS background image won't scale -


i'm trying learn html , css. right i'm trying make background image fill browser window no matter size. i've googled 100 times , every page pretty says same thing. copied code , isn't working me. when set browser smaller size, background image repeats itself. don't want want fill window. here's css.

html { background-image:url(background.jpg); background-size: 100%; background-image: no-repeat-y; } 

before did 100%, tried using cover instead , didn't work either. image fullscreen when window maximized when resize image repeat.

to scale, css want scale needs inside container itself, namely body inside html container; try this:

html {   width: 100%;   height: 100%;   margin: 0;   padding: 0; }  body {   background-image:url(background.jpg);   background-size: 100% 100%;   background-repeat: no-repeat-y; } 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -