CSS, Web Development.
)，最後配上 @for 迴圈，可以寫成下列樣子 Then we can calculate the interval as (100% — img_width) / (5–1). Combining with the @for loop, the code is as follows: $img_width: 80px; $img_amount: 5; @for $i from 1 through $img_amount { .img:nth-child(#{$i}) { left: calc( ( #{$i} - 1 ) * ( 100% - #{$img_width} ) /