Analysis of mobile attributes in css3

不言
Release: 2018-06-26 14:10:17
Original
2380 people have browsed it

This article mainly introduces the detailed explanation of the mobile attributes of the CSS3 learning series. The content is quite good. I will share it with you now and give it as a reference.

transform function

Zoom

Use the sacle method to realize the scaling of text or images, specified in the parameters Zoom ratio, for example, sacle(0.5) means to reduce the size by 50%. The example is as follows:




    
    scale方法使用示例
    


示例文字

Copy after login

In addition, you can specify the horizontal magnification and vertical magnification of the element separately. Magnification, examples are as follows:




    
    scale方法使用示例
    


示例文字

Copy after login

Tilt

Use the skew method to implement text Or image tilt processing, specify the tilt angle in the horizontal direction and the tilt angle in the vertical direction respectively in the parameters. For example, "skew(30deg,30deg)" means tilting 30 degrees in the horizontal direction and tilting 30 degrees in the vertical direction. The example is as follows :




    
    skew方法使用示例
    


示例文字

Copy after login

Rotation

Use the rotate method to rotate the element, with one parameter. "Angle", the unit deg means degree, a positive number means clockwise rotation, and a negative number means counterclockwise rotation. Examples are as follows:




    
    对元素使用多重变形的示例
    


示例文字

Copy after login

Move

Use the translate method to translate text or images To move, specify the moving distance in the horizontal direction and the moving distance in the vertical direction in the parameters. For example:




    
    translate方法使用示例
    


示例文字

Copy after login

Deformation example

Example 1:




    
    对元素使用多重变形的示例
    


示例文字

Copy after login

This example is to move first, then rotate, and finally scale

Effect:

Example 2 :




    
    对元素使用多重变形的示例
    


示例文字

Copy after login

First rotate, then scale, and finally move

Effect:

We can see from the running results of the two examples that the positions of the elements on the two pages are not the same. Let’s take a look at their detailed steps:

First example:

1) First move 150px to the right and 200px down.

2) Then rotate 45 degrees and magnify 1.5 times.

Second example:

1) First rotate 45 degrees and magnify 1.5 times.

2) Then move 150px to the right and 200px down.

The above is the entire content of this article. I hope it will be helpful to everyone’s study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

How to use the table-layout attribute of CSS

Instructions on the use of animate, the animation effect of css3 Introduction to browser compatibility

About the use of the background-attachment attribute of css

The above is the detailed content of Analysis of mobile attributes in 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!