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

2025-11-05 07:05:44

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() 的用法

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢