What if there is an error in the offset of the broadcast map? the offsetWidth is used.

clipboard.png
clipboard.png
the width of the picture is adaptive to rem. Sometimes there is a width of 381.688, but the width obtained with offsetWidth is 382, so the error is larger when the broadcast picture is moved to the next few pictures. What are the bosses going to do

?

Scheme 1: adaptive width percentage
Scheme 2: I only use swiper


to replace offsetWidth with getBoundingClientRect (). Width.
getBoundingClientRect (). Width can take the decimal point

.
Menu