Skip to content

Instantly share code, notes, and snippets.

@TheCodonist
Created June 1, 2023 08:38
Show Gist options
  • Save TheCodonist/4a4dd6c93840511f0daa0c6feb02fafb to your computer and use it in GitHub Desktop.
Save TheCodonist/4a4dd6c93840511f0daa0c6feb02fafb to your computer and use it in GitHub Desktop.
<section class="bg-img" style="--bg-img: url('/path-to-image/image.png')"></section>
<style>
.bg-img{
background-image: var(--bg-img);
background-repeat: no-repeat;
background-position: 0 0;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment