zoukankan      html  css  js  c++  java
  • CSS3 2D转换

    通过Css3转换,我们能够对元素进行移动、缩放、转动、拉长或拉伸。

    转换是使元素改变形状、尺寸和位置的一种效果,可以使用2D、3D来转换元素。

    2D转换方法:

    translate()  元素从其当前位置移动,根据给定的 left(x 坐标) 和 top(y 坐标) 位置参数

    transform:translate(50px,100px);//x轴移动50px,y 轴移动100px;

    rotate() 元素顺时针旋转给定的角度。允许负值,元素将逆时针旋转。

    transform: rotate(30deg);//顺势转转30度

    scale()  元素的尺寸会增加或减少

    transform: scale(2,4);  //scale(2,4) 把宽度转换为原始尺寸的 2 倍,把高度转换为原始高度的 4 倍

    skew()  元素翻转给定的角度,根据给定的水平线(X 轴)和垂直线(Y 轴)参数:

      transform: skew(30deg,20deg); //围绕 X 轴把元素翻转 30 度,围绕 Y 轴翻转 20 度。

    matrix()  把所有 2D 转换方法组合在一起。需要六个参数,包含数学函数,允许您:旋转、缩放、移动以及倾斜元素。

    transform:matrix(0.866,0.5,-0.5,0.866,0,0);
  • 相关阅读:
    使用lambda的精简写法
    lambda实现集合遍历 排序
    stream流 list转map
    stream.min
    lambda实现线程调用
    stream.allMatch
    stream.reduce
    stream流 of
    Stream流 list转set
    SQL Server 游标的简单介绍 转载
  • 原文地址:https://www.cnblogs.com/ayqxm/p/5607372.html
Copyright © 2011-2022 走看看