<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Urls in Css custom properties</title>
:root {
  /* Use url() to declare your variable */
  --bg-image: url(https://www.theuiaa.org/wp-content/uploads/2017/12/2018_banner.jpg);

body {
  margin: 0;
  min-height: 100vh;
  /* Use var(), without url(), to get the value */
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.