Home  »  CodeSnippets   »   How to Stop a Background Image From Repeating in CSS

How to Stop a Background Image From Repeating in CSS

Posted: March 5, 2022 | by Michael Bright

Example snippet for a non-repeating background image.

.background {
  background-image: url('background-image.jpg');
  background-repeat: no-repeat;
  background-size: 100%;
}

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.