0
JS | HTML how do you ... do this...
I donât know what to title it. Iâm gonna explain it though. Letâs say I have 10 elements. Class = âbâ; I want the width to += 10 + âpxâ; It doesnât have to be 10 but just for example. So the 1st element would be width 10px 2nd element width 20px 3rd element width 30px ... https://code.sololearn.com/WCU1quD6V3Fe/?ref=app
2 Answers
+ 1
x[i].style.width = (i+1)*80 + "px"