+ 3
How can I make this code display a 3d regular pyramid ?
This is a code I made trying to make a 3d pyramid but I can not think of a way to convert those rectangles into equilateral triangles. https://code.sololearn.com/WBHQc83YJyrp/?ref=app
8 Respostas
+ 3
https://code.sololearn.com/WJLRSsJL2ZyM/?ref=app
+ 2
https://code.sololearn.com/WdDHKx0zZog8/?ref=app
This was another solution I found experimenting yesterday. It is a bit shorter but not very intutive
+ 2
That's cool... because it could be less or more unintuitive for a lot ;)
However, once you have understood the trick, that's not very hard... even if html and css could become very verbose to describe complex combinations ;) (that's true for a lot of tricks to avoid js and use only pure Html/Css)
+ 2
Yeah, your solution is a most known trick to draw triangle with html/css... (good idea anyway: I have thinking to it, but the other solution is more flexible).
What I should test one day, is to try to use svg and/or canvas instead more classicals elements ;P
+ 2
That's a good challenge, and could work even if js is not available (user disabled it, plain text browser, and so on...)
+ 1
Thank you very much. Your program was very easy to understand.
+ 1
You are correct visph. Js is very useful but not using it is sometimes a better approach.
😀
0
That would surely be an interesting and challenging. 👍🏻👍🏻