简体   繁体   中英

Calculating total width of div with hidden images

I am trying to calculate the width of a div with 10 images of width 200px.

However the images have overflow: hidden in the css. I believe this means I can not get the correct value for the width. Do you know how I can somehow get the correct value of 2000 px and not the viewport width?

Here is a codepen example:

http://codepen.io/dwigt/pen/EWvoEo/?editors=1111

$('.scrollmenu')[0].scrollWidth

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM