First put a size on html
and body
to not have problems resize.
Then the Browser reads CSS from top to bottom, then first you need to declare the Background (which is a "shortcut" where you can insert several attributes in a single line), then its attributes.
background: url(http://placeskull.com/500/500);
background-position: center;
background-repeat: no-repeat;
etc...
Or so
background: url(http://placeskull.com/500/500) center no-repeat fixed / 100%;
Check on the Snippet
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
body {
color: #000000;
font-family: 'Lato', sans-serif;
background: url(http://placeskull.com/500/500);
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100%;
}
NOTE: Due to the order of reading the CSS by the Browser if a class "shortcut" such as Edge or Background is used, problems may occur. Especially if one attribute depends on the other to be rendered by the Browser. See below.
For example this CSS won’t work out:
border-color: #f00;
border-style: dashed;
border: 2px;
It will already work:
border: 2px;
border-color: #f00;
border-style: dashed;
Vlw bro thanks!
– Felipe