<section>
<h2>repeat</h2>
<div class="section image"></div>
</section>
<section>
<h2>repeat-x</h2>
<div class="section image repeat-x"></div>
</section>
<section>
<h2>repeat-y</h2>
<div class="section image repeat-y"></div>
</section>
<section>
<h2>no-repeat</h2>
<div class="section image no-repeat"></div>
</section>
<section>
<h2>space</h2>
<div class="section image repeat-space"></div>
</section>
<section>
<h2>round</h2>
<div class="section image repeat-round"></div>
</section>
xxxxxxxxxx
body {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 30px;
font: 14px/1.5 monospace;
}
.section {
height: 200px;
background: #ffeb3b;
}
.image {
background-image: url(https://assets.codepen.io/1425525/Hexlet_Logo-01-svg__1_.png);
}
.repeat-x {
background-repeat: repeat-x;
}
.repeat-y {
background-repeat: repeat-y;
}
.no-repeat {
background-repeat: no-repeat;
}
.repeat-space {
background-repeat: space;
}
.repeat-round {
background-repeat: round;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.