Home>Article>Web Front-end> How to enlarge div in css3
Method: 1. Use the transform attribute and scale() function to enlarge the div. The syntax is "Element {transform:scale (magnification)}"; 2. Use the width and height attributes to achieve the effect of enlarging the div. The syntax is: "Element {width: width; height: height}".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
How to enlarge div in css3
In css, if you want to enlarge a div, you can use the transform attribute and the width and height attributes. accomplish.
1. Use the transform attribute with the scale() function to achieve the effect of enlarging the div
The transform attribute applies 2D or 3D transformation to the element. This property allows us to rotate, scale, move or tilt the element.
The example is as follows:
Document
Output result:
2. Use the width and height attributes to achieve the effect of enlarging the div.
The example is as follows:
Document
Output result:
(Learning video sharing:css video tutorial)
The above is the detailed content of How to enlarge div in css3. For more information, please follow other related articles on the PHP Chinese website!