Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to enlarge the picture with mouse click by css3

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "css3 how to click the mouse to enlarge the picture", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "css3 how to achieve mouse click picture magnification" article.

Implementation method: 1, use the ": active" selector to select the state of the mouse click on the picture; 2, use the transform attribute and scale () function to achieve picture magnification, syntax "img:active {transform: scale (x-axis magnification, y-axis magnification);}".

The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.

Css3 to enlarge the picture by clicking the mouse

Realize the idea:

Use the ": active" selector to select the status of the mouse click on the picture

Use the transform property and the scale () function to achieve magnification

Syntax:

Img:active {transform: scale (2Jing 2);}

Implementation example:

Img:active {margin: 100pxscape transform: scale (2,2);}

Description:

Active is interpreted as "positive" in English, which means click on the mouse. The most examples of active selectors are probably applied to links, but opening a link is an instant action, which does not well reflect the characteristics of active selectors.

The Transform attribute is applied to the 2D or 3D transformation of an element. This property allows you to rotate, scale, move, tilt, and so on. When this attribute is used with the scale () function, the attribute element scales the effect.

The above is about the content of this article on "how to click on the mouse to enlarge the picture in css3". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report