rotate() 的用法和scale() 的用法

时间:2026-02-18 04:01:22

1、新建div倾斜30度角

rotate() 的用法和scale() 的用法

rotate() 的用法和scale() 的用法

2、新建div倾斜45度角

rotate() 的用法和scale() 的用法

rotate() 的用法和scale() 的用法

3、新建div倾斜60度角

rotate() 的用法和scale() 的用法

rotate() 的用法和scale() 的用法

4、新建div倾斜90度角

rotate() 的用法和scale() 的用法

rotate() 的用法和scale() 的用法

5、新建div缩小0.5

rotate() 的用法和scale() 的用法

rotate() 的用法和scale() 的用法

6、新建div长扩大2倍 款扩大3倍

rotate() 的用法和scale() 的用法

rotate() 的用法和scale() 的用法

7、附上源码

<body>

<style>

.d1{

margin:100px 50px;

width:200px;

height:100px;

background-color:red;

transform:rotate(30deg);}

.d2{

margin:100px 50px;

width:200px;

height:100px;

background-color:red;

transform:rotate(45deg);}

.d3{

margin:100px 50px;

width:200px;

height:100px;

background-color:red;

transform:rotate(60deg);}

.d4{

margin:100px 50px;

width:200px;

height:100px;

background-color:red;

transform:rotate(90deg);}

.d5{

margin:100px 50px;

width:200px;

height:100px;

background-color:red;

transform: scale(0.5,0.5);}

.d6{

margin:100px 50px;

width:200px;

height:100px;

background-color:red;

transform: scale(2,3);}

</style>

<div class="d1"></div>

<div class="d2"></div>

<div class="d3"></div>

<div class="d4"></div>

<div class="d5"></div>

<div class="d6"></div>

</body>

rotate() 的用法和scale() 的用法

© 2026 裕芯经验网
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com