property

background-repeat-x — CSS reference

Level 4 defines a separate horizontal tiling longhand. Initial repeat; not inherited. Use the two-value background-repeat declaration as a portable fallback. Tested Chromium rejected this longhand, so the fallback is retained.

Formal Syntax & Structure

css syntaxcss
[ repeat | space | round | no-repeat ]#

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS image painting lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{width:100px;height:80px;background-color:blue}#a{background-image:linear-gradient(red,red);background-repeat:no-repeat;background-repeat-x:space}</style><body><div id="a" aria-hidden="true"></div><p>Decorative background sample.</p></body></html>
CSS Reference