Tsallaka zuwa abun ciki
Justice Tech School

Background Position, Size and Repeat

background-repeat tiles an image, background-position places it and background-size controls its size with cover or contain. background-attachment: fixed creates parallax.

Example
<style>
.b { height: 80px; background: linear-gradient(135deg, #14b8a6, #f59e0b) no-repeat center / 60% 60% #1e293b }
</style>
<div class="b"></div>

Exercise

Fill the box, cropping if needed.

background-size: ;

Quiz Test

Which keeps the whole image visible?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.