• transformorigin


    transform-Origin属性允许您更改转换元素的位置。

    2D转换元素可以改变元素的X和Y轴。 3D转换元素,还可以更改元素的Z轴。

    为了更好地理解Transform-Origin属性,请查看这个:
    https://www.runoob.com/try/try.php?filename=trycss3_transform-origin_inuse

    transform-origin属性值可以是百分比、em、px等具体的值,也可以是top、right、bottom、left和center这样的关键词。

    其各个值的取值简单说明如下:

    x-offset:用来设置transform-origin水平方向X轴的偏移量,可以使用和值,同时也可以是正值(从中心点沿水平方向X轴向右偏移量),也可以是负值(从中心点沿水平方向X轴向左偏移量)。
    y-offset:用来设置transform-origin属性在垂直方向Y轴的偏移量,可以使用和值,同时可以是正值(从中心点沿垂直方向Y轴向下的偏移量),也可以是负值(从中心点沿垂直方向Y轴向上的偏移量)。
    z-offset:用来设置3D变形中transform-origin远离用户眼睛视点的距离,默认值z=0,其取值可以,不过在这里将无效。

    offset-keyword:是top、right、bottom、left或center中的一个关键词,可以用来设置transform-origin的偏移量。

    x-offset-keyword:是left、right或center中的一个关键词,可以用来设置transform-origin属性值在水平X轴的偏移量。
    y-offset-keyword:是top、bottom或center中的一个关键词,可以用来设置transform-origin属性值在垂直方向Y轴的偏移量。
    为了方便记忆,可以把关键词和百分比值对比起来记

    top = top center = center top = 50% 0
    right = right center = center right = 100%或(100% 50%)
    bottom = bottom center = center bottom = 50% 100%
    left = left center = center left = 0或(0 50%)
    center = center center = 50%或(50% 50%)
    top left = left top = 0 0
    right top = top right = 100% 0
    bottom right = right bottom = 100% 100%
    bottom left = left bottom = 0 100%

  • 相关阅读:
    python数据类型
    集合(set)内置方法
    python第三天
    剑指offer-什么是1G/2G/3G/4G/5G
    经典交换实验-二层交换机实现pc隔离&vlan通信
    linux运维神器-htop&mtr
    三分钟速学linux-进程管理命令
    三分钟速学文件权限管理
    三分钟速学网卡管理配置-nmcli命令
    三分钟速学linux-centos/redhat常见包管理器
  • 原文地址:https://www.cnblogs.com/pansidong/p/15514488.html
Copyright © 2020-2023  润新知