css3的3D和2D

來源:互聯網
上載者:User

標籤:style   io   color   ar   使用   for   sp   strong   div   

css3的3D旋轉:
rorateX():參數為正值時,盒子是圍繞x軸,完成從Y軸正方向到Y軸負方向的旋轉,視覺上呈現高度上的變化。
rorateY():參數為正值時,盒子是圍繞Y軸,完成從X軸正方向到X軸負方向的旋轉,視覺上呈現盒子寬度上的變化。
css2D旋轉:
translate(a,b):a,b,均大於0時,a表示是在水平方向的位移(從左向右),b是垂直方向的位移(從上往下),
rotate(a):a>0,在水平面上順時針旋轉的度數,a<0時,在水平面上逆時針旋轉度數。
scale(x,y):x是指盒子寬度的變化,y是指盒子高度的變化,0-1盒子縮小,>1盒子變大。
skew(x,y):沿x軸翻轉x度數,沿y軸翻轉y度數。
matrix():可以整合所有2D的轉換方法,包括六個參數:a,b,c,d,e,f。
transform:屬於css屬性,上述方法屬於該屬性的值。
div{
transform:rorate(30deg);}
css3的過渡:
transition: width 1s linear 2s;
四個屬性:要使用過渡的屬性,過渡的時間,過渡的線性路線,過渡效果開始的時間。\

css3的動畫:

 

設定定義動畫
from~to
@keyframes myfirst{from {background: red;}to {background: yellow;}}
0%~100%
@keyframes myfirst{0%   {background: red;}25%  {background: yellow;}50%  {background: blue;}100% {background: green;}}

 

 

綁定動畫:
div{animation: myfirst 5s;-moz-animation: myfirst 5s;/* Firefox */-webkit-animation: myfirst 5s;/* Safari 和 Chrome */-o-animation: myfirst 5s;/* Opera */}

 

animation: myfirst 5s linear 2s infinite alternate;
常用幾個屬性:1,動畫名稱,2,動畫周期時間,3,動畫速度曲線,4,動畫開始時間,5,播放次數,

css3的3D和2D

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.