Why doesn't it work if i set the display to inline? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why doesn't it work if i set the display to inline?

See this code: https://code.sololearn.com/WIsgXtc8U7ua/?ref=app When i set the display to inline in line 16 the transform doesn't work. But after setting it to inline-block it worked. But what's the logic?

12th Jul 2020, 5:40 AM
MSN
MSN - avatar
2 Answers
+ 2
probably inline element is not transformable element https://drafts.csswg.org/css-transforms-1/ "all elements whose layout is governed by the CSS box model except for non-replaced inline boxes, table-column boxes, and table-column-group boxes [CSS2]"
12th Jul 2020, 6:22 AM
Taste
Taste - avatar
12th Jul 2020, 6:20 AM
Nor'wester 🌪️ 🇧🇩 (INACTIVE)
Nor'wester 🌪️ 🇧🇩 (INACTIVE) - avatar