Search code examples
htmlcsswebvisual-web-developer

CSS background syntax


I've seen an curious code example. I don't know completely what center center / cover means.
center center means center the background
cover means adjust the background to the area
But what does center center / cover mean?

background {transparent url(...) no-repeat scroll center center / cover;}

Solution

  • From https://developer.mozilla.org/en/docs/Web/CSS/background

    <bg-size> See background-size. This property must be specified after <position>, separated with the '/' character.

    i.e. it just seperates the background size from the position