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
Linda HamiltonOriginal
2024-11-02 04:39:30775browse

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>
<code class="html"><div class="box">
</div></code>

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!

Statement:
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