below css is working with contain as it 's separately given as background-size but not by using the shorthand given in background
even i also eager to know the the parameters' sequence for background property in CSS
body {
background: #00ff00 url("smiley.gif") no-repeat fixed center;
background-size:contain,contain;
}
body {
background: #00ff00 url("smiley.gif") no-repeat contain,contain fixed center;
}
but this is not working as i tried this shorthand method as above
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
<p>This is some text</p>
there is not an issue to use separately but need to know that whether any way to use background-size:contain in shorthand background property
even you can just check it out by making change in W3School's example here is the url for it
click to check your way
background: #00ff00 url("smiley.gif") no-repeat fixed center / contain;
this should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With