<h2><code>scroll (defecto)</code></h2>
<div class="scroll">
  background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
  background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll<br>
	background-attachment: scroll</div>

<h2><code>fixed</code></h2>
<div class="fixed">background-attachment: scroll<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
  background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed<br>
	background-attachment: fixed</div>

<h2><code>local</code></h2>
<div class="local">
  background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
  background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local<br>
	background-attachment: local</div>

<br class="extra-space">
h2 {
  text-align: center;
  margin-top: 48px;
}

div {
  height: 200px;
  width: 80%;
  margin: 32px auto;
  overflow-x: hidden;
  overflow-y: scroll;
  color: white;
  text-shadow: 0 -.1em .1em black;
  text-align: center;
  background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/222579/castell.jpg");
}

.scroll {  
  background-attachment: scroll;
}

.fixed {
  background-attachment: fixed;
}

.local {
  background-attachment: local;
}

.extra-space {
  margin-bottom: 50px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js