[CSS3] Transition Function

Reference: Click Here


这里写图片描述


(1) Transition

   平滑过渡的效果, 部分的解决Flash问题

   transition:属性 时间 函数 延迟时间
      执行变换的属性:transition-property
      变换延续的时间:transition-duration
      动画函数:transition-timing-function
      变换延迟时间:transition-delay


 transition-timing-function:
      ease 变慢
      linear 恒速
      ease-in 加速 渐显效果
      ease-out 减速 渐隐效果
      ease-in-out 先加速 后减速

Example:

<div>Click Me!</div>
div{
  position: relative;
  width:100px;
  height:100px;

  border:2px solid orange;
  color:green;
  background:rgba(200,220,001,0.4);
  -webkit-transition-property:background border color font-weight;
  -webkit-transition-duration:2s;
  -webkit-transition-timing-function:linear;
}
div:hover{
  background:red;
  color:black;
  border:1px dotted green;
  font-weight:bold;
  -webkit-transform:translate(20px,0);
}

这里写图片描述
这里写图片描述
这里写图片描述


(2) 多个CSS3过渡效果

这里写图片描述

div{
  position: relative;
  width:100px;
  height:100px;

  color:green;
  background:rgba(200,220,001,0.4);
  /****************/
  /*transition:background 3s linear 1s*/
  /****************/
  -webkit-transition:background 3s linear 1s, color 1s ease-in 1s,-webkit-transform 2s linear 1s;
  /****************/
}
div:hover{
  background:red;
  color:black;
  -webkit-transform:translate(200px,0);
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值