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
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