JSFiddle - React, Tailwind, and code Playground

HTML

<div class="bgpic">

    The background is fixed relative to the viewport. Even if an element has a scrolling mechanism, the background doesn't move with the element. (This is not compatible with background-clip: text.)
local

    The background is fixed relative to the element's contents. If the element has a scrolling mechanism, the background scrolls with the element's contents, and the background painting area and background positioning area are relative to the scrollable area of the element rather than to the border framing them.
scroll

    The background is fixed relative to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)

Formal definition
Initial value	scroll
Applies to	all elements. It also applies to ::first-letter and ::first-line.
Inherited	no
Computed value	as specified
Animation type	discrete
Formal syntax

background-attachment = 
  <attachment>#  

<attachment> = 
  scroll  |
  fixed   |
  local   

Examples
Simple example
HTML

<p>
  There were doors all round the hall, but they were all locked; and when Alice
  had been all the way down one side and up the other, trying every door, she
  walked sadly down the middle, wondering how she was ever to get out again.
</p>

CSS

p {
  background-image: url("starsolid.gif");
  background-attachment: fixed;
}
Multiple background images

This property supports multiple background images. You can specify a different <attachment> for each background, separated by commas. Each image is matched with the corresponding <attachment> type, from first specified to last.
HTML

<p>
  There were doors all round the hall, but they were all locked; and when Alice
  had been all the way down one side and up the other, trying every door, she
  walked sadly down the middle, wondering how she was ever to get out again.
  Suddenly she came upon a little three-legged table, all made of solid glass;
  there was nothing on it except a tiny golden key, and Alice's...

SCSS

.bgpic{
  width:90%;
  padding:12px;
  background:url("https://cdn.fishki.net/upload/post/201405/15/1269354/b77b342f6cf33f5d7c12aa1b8ef22dc6.jpg") no-repeat;
  background-position:top right;
  background-attachment:fixed;
  background-size:auto 100%;
  border:1px solid red;
}