Home > Web Front-end > CSS Tutorial > How to do 2D transformation via CSS3

How to do 2D transformation via CSS3

jacklove
Release: 2018-06-11 17:50:06
Original
2774 people have browsed it

Transformation is an effect that changes the shape, size and position of an element. CSS3 includes 2D transformation and 3D transformation. Here we only accept 2D transformation!

1. translate() method

Through the translate() method, the element is moved from its current position Move and convert according to the given position parameters

## Code implementation:

Actual effect:


##2.

rotate() method


Through the rotate() method, the element is rotated clockwise by a given angle.

Code implementation:


##Actual effect:


##3.scale() method

##Through the scale() method, the size of the element will increase or decrease Code implementation:


actual effect:

##4.skew() method

Through the skew() method, elements Flip the given angle

Code implementation:


##Actual effect:


This article explains how to perform 2D conversion through CSS3. For more related content, please pay attention to the php Chinese website.

Related recommendations:

Detailed explanation of JavaScript variables and scope


Detailed explanation of $.ajax() method parameters


Explanation of mathematical object Math related content

The above is the detailed content of How to do 2D transformation via CSS3. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template