CSS3 Transform to Trapezoid

后端 未结 1 647
旧时难觅i
旧时难觅i 2021-01-15 06:52

I need to create a CSS3 trapezoid using a div element. To make it crystal clear what I\'m doing I\'ve created a basic visual below; green is a normal rectangular div while t

相关标签:
1条回答
  • 2021-01-15 06:57

    Try this:

    .trapezoid { transform: perspective(600px) rotateY(-45deg) scale(1.1,1.1); }
    

    Adjust values as necessary.

    0 讨论(0)
提交回复
热议问题