-1
CSS Syntax:
background: color position size repeat origin clip attachment image|initial|inherit;

With this css rule I got white background:

<style>
body
{ 
background: #00ff00 url('smiley.gif') no-repeat fixed cover center; 
}
</style>

What's wrong? Any Idea? I try to set background-size cover with short background command?

user3327101
  • 171
  • 1
  • 3
  • 8

1 Answers1

0

From the Mozilla reference for background:

background-size: This property must be specified after background-position, separated with the '/' character.

So:

background: #00ff00 url('smiley.gif') no-repeat fixed center / cover;
Guffa
  • 687,336
  • 108
  • 737
  • 1,005