Home > Web Front-end > CSS Tutorial > How to Create This Specific Irregular Square Shape with CSS?

How to Create This Specific Irregular Square Shape with CSS?

Linda Hamilton
Release: 2024-11-02 04:39:30
Original
760 people have browsed it

Creating Irregular Square Shapes with CSS

Question:

How to create this specific irregular square shape with CSS?

Image example:

How to Create This Specific Irregular Square Shape with CSS?

Answer:

Rotation and perspective effects can be used To create this irregular shape:

<code class="css">.box {
  width: 150px;
  height: 120px;
  background: #f540a8;
  margin: 20px;
  transform: perspective(180px) rotateX(15deg) rotateY(20deg) rotateZ(-3deg);
}</code>
Copy after login
<code class="html"><div class="box">
</div></code>
Copy after login

The above is the detailed content of How to Create This Specific Irregular Square Shape with CSS?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template