In the tab column, there are some 3 words and some 2 words. How can I use js to calculate its total length? do you add each item in a loop?

clipboard.png

Mar.05,2021

just get the width of the external container directly


do not wrap, use flex ,

// box
.box{
    display: flex;
}

you can either get the width of the parent container directly

Menu