+```css demo.css hidden
+body {
+ align-items: center;
+ display: flex;
+ justify-content: center;
+}
+.container {
+ border: 1px solid rgb(203 213 225);
+ border-radius: 0.25rem;
+ height: 12rem;
+ width: 16rem;
+ overflow: auto;
+ padding: 0.5rem;
+}
+```
+
+```css styles.css hidden
+.container {
+ --odd-background: rgb(203 213 225);
+ --even-background: #fff;
+ --line-height: 1.5rem;
+ line-height: var(--line-height);
+ background: repeating-linear-gradient(
+ var(--odd-background),
+ var(--odd-background) var(--line-height),
+ var(--even-background) var(--line-height),
+ var(--even-background) calc(2 * var(--line-height))
+ );
+}
+```
+
+```html index.html hidden
+
+ Very night his itself won't him morning dominion behold abundantly them above night. Good one whose moved over firmament. Seed heaven itself face. His living, which darkness and subdue fourth living good over, without made a moveth seas.
+
+ To spirit very bring was it every seed. Behold blessed greater. Won't let earth very saying evening seas night subdue his you're spirit saying.
+
+ Creepeth she'd had kind set place make. After behold fruitful open female. For without multiply itself you're. Meat creeping years after us unto grass over said itself light she'd, living. Void grass, yielding. Whose appear it i, darkness.
+
+```
+
+
+## Aligning the background with lines
+
+In the demo above, you may have noticed that the background of the element doesn't always align perfectly with each line. This can be frustrating, but don't worry! There's a simple solution using the `background-origin` property.
+
+By default, this property is set to `padding-box`, which means that the background starts at the edge of an element's padding. However, we can change this value to `content-box`, which will make the background start at the edge of an element's content.
+
+To fix this issue, simply add `background-origin: content-box;` to your CSS code for the `.container` class. This will ensure that the zebra-like background aligns perfectly with each line of text, giving your design a more polished and professional look.
+
+```css
+.container {
+ background-origin: content-box;
+}
+```
+
+## Keeping the background in place while scrolling
+
+Let's make sure our zebra-like background doesn't move around as users scroll through our content. We can do this by using the `background-attachment` property. By default, this property is set to `scroll`, which means the background moves along with the content. However, if we change the value to `local`, the background will stay in place relative to its container element.
+
+Here's the sample code:
+
+```css
+.container {
+ background-attachment: local;
+}
+```
+
+Now, when we add `background-attachment: local;` to our `.container` class, the background will stay put as users scroll through the element's contents. This creates a smoother scrolling experience and helps maintain a consistent visual layout throughout.
+
+Let's take a look at the last example.
+
+
+```css demo.css hidden
+body {
+ align-items: center;
+ display: flex;
+ justify-content: center;
+}
+.container {
+ border: 1px solid rgb(203 213 225);
+ border-radius: 0.25rem;
+ height: 12rem;
+ width: 16rem;
+ overflow: auto;
+ padding: 0 0.5rem;
+}
+```
+
+```css styles.css
+.container {
+ --odd-background: rgb(203 213 225);
+ --even-background: #fff;
+ --line-height: 1.5rem;
+ line-height: var(--line-height);
+ background: repeating-linear-gradient(
+ var(--odd-background),
+ var(--odd-background) var(--line-height),
+ var(--even-background) var(--line-height),
+ var(--even-background) calc(2 * var(--line-height))
+ );
+ background-attachment: local;
+ background-origin: content-box;
+}
+```
+
+```html index.html
+
+ Very night his itself won't him morning dominion behold abundantly them above night. Good one whose moved over firmament. Seed heaven itself face. His living, which darkness and subdue fourth living good over, without made a moveth seas.
+
+ To spirit very bring was it every seed. Behold blessed greater. Won't let earth very saying evening seas night subdue his you're spirit saying.
+
+ Creepeth she'd had kind set place make. After behold fruitful open female. For without multiply itself you're. Meat creeping years after us unto grass over said itself light she'd, living. Void grass, yielding. Whose appear it i, darkness.
+
+```
+