How to create cube with only HTML and CSS?

前端 未结 9 1979
星月不相逢
星月不相逢 2021-01-30 17:03

I have this and I want to make a cube with HTML & CSS only like in the above image. My best try:

9条回答
  •  一个人的身影
    2021-01-30 18:00

    Changing the CSS for .square3 should do it:

    height: 58px;
    left: 50px;
    position: absolute;
    top: -18px;
    transform: skew(240deg, 150deg);
    width: 100px;
    

    https://jsfiddle.net/8vuj7peb/26/

提交回复
热议问题