Overview:
The newly added Transform in CSS3 can change the coordinates of elements in the visual area (this change will not cause the document to be rearranged, only rearranged), as well as the shape, There are also some 3D deformations. Combined with Animation (there will be a link here later), cool animations can be achieved;
Rotate (rotate):
rotate supports one parameter, an angle value 0- 360deg
#demo { transform:rotate(180deg) ;/*实现旋转,左上角的东西会在右下角显示*/}
Scale:
scale supports two parameters (x, y). If y is not filled in, Take the value of , scaleY, used to set the scaling of x or y respectively;
skew (skew):
#demo { transform:scale(1.2);/*放大1.2倍*/ transform:scale(.8);/*缩小为正常的0.8倍*/}skew supports two parameters (x, y), the parameter type is angle (deg), if If y is not filled in, it defaults to 0 (different from scaling);
If only x or y is set, two sub-methods can be used directly, skewX and skewY;
Translation (translate):
#demo { transform:skew(45deg);/*文本沿x轴向左倾斜45°*/ transform:skew(0,45deg);/*文本沿y轴向下倾斜45°*/}translate receives two parameters (x, y) which are the translation distance. If the y value is not filled in, it defaults to 0 and supports all CSS Valid length unit within (using translate to move elements will not trigger reflow, only redrawing);
also has two sub-methods, translateX, translateY;
Made a simple example, using rotate;
Summary:
#demo { transform:translate(20px,5vh);/*向左移动二十像素,向下移动百分之五的视窗高度*/}You can do a lot of cool things with Transform, (matrix is skipped, matrix3d did not say ...) Of course, don’t seek death like me
Related reference documents:
MDN’s Transform
w3school’s Transform
W3 Documentation

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

The default playback control style of HTML video cannot be modified directly through CSS. 1. Create custom controls using JavaScript. 2. Beautify these controls through CSS. 3. Consider compatibility, user experience and performance, using libraries such as Video.js or Plyr can simplify the process.

Potential problems with using native select on mobile phones When developing mobile applications, we often encounter the need for selecting boxes. Normally, developers...

What are the disadvantages of using native select on your phone? When developing applications on mobile devices, it is very important to choose the right UI components. Many developers...

Use Three.js and Octree to optimize collision handling of third-person roaming in the room. Use Octree in Three.js to implement third-person roaming in the room and add collisions...

Issues with native select on mobile phones When developing applications on mobile devices, we often encounter scenarios where users need to make choices. Although native sel...


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6
Visual web development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
