日本一卡精品视频免费丨国产午夜片无码区在线播放丨国产精品成人久久久久久久丨国产亚洲日韩av在线播放不卡丨亚洲日韩av无码

CSS 3D 基礎知識

2017/2/11 8:32:47   閱讀:1743    發布者:1743

css3d 總結

3d transform (3D變形)(rotate skew scale translate)

基礎知識

perspective (視距,景深) perspective-origin (視點)
transfrom

(1) 坐標 x y z

(2) 變形 基點位置 transform-origin
(3)transfrom-style:preserve-3d

3D旋轉圖片相冊

3d transform (3D變形)(rotate skew scale translate)

基礎知識

perspective (視距,景深) perspective-origin (視點)
transfrom

(1) 坐標 x y z

(2) 變形 基點位置 transform-origin
(3)transfrom-style:preserve-3d

3D旋轉圖片相冊


它就用到了一個比較簡單的坐標y 軸旋轉那咱們看一下他的代碼

html的代碼:
	

首先要建九個盒子放九張圖片,這個很容易理解的。

css的代碼
body{ background: #6daf39;(背景加了個顏色 主要是好看) } .xj{ perspective:600px;(這是井深) } .kj{ transition: 1s;(運動時間) transform-style:preserve-3d;(實現3d效果 當然這是非常重的) width:200px; height: 300px; margin:80px auto; position: relative; transform: rotateY(0deg) rotateX(0deg) translateZ(-275px); transform-origin: center center -275px; } .mian{ position:absolute; font-size: 50px; color:#fff; text-align: center; line-height: 300px; } .mian:nth-child(1){ width:200px; height: 300px; background: #ff2223; transform: rotateY(0deg)translateZ(275px); } .mian:nth-child(2){ width:200px; height: 300px; background: #ff2223; transform: rotateY(40deg)translateZ(275px); } .mian:nth-child(3){ width:200px; height: 300px; background: #ff2223; transform: rotateY(80deg)translateZ(275px); } .mian:nth-child(4){ width:200px; height: 300px; background: #ff2223; transform: rotateY(120deg)translateZ(275px); } .mian:nth-child(5){ width:200px; height: 300px; background: #ff2223; transform: rotateY(160deg)translateZ(275px); } .mian:nth-child(6){ width:200px; height: 300px; background: #ff2223; transform: rotateY(200deg)translateZ(275px); } .mian:nth-child(7){ width:200px; height: 300px; background: #ff2223; transform: rotateY(240deg)translateZ(275px); } .mian:nth-child(8){ width:200px; height: 300px; background: #ff2223; transform: rotateY(280deg)translateZ(275px); } .mian:nth-child(9){ width:200px; height: 300px; background: #ff2223; transform: rotateY(320deg)translateZ(275px); }

css就到這里,很簡單的;

js的代碼
kj.onclick=function () { 
      cishu++; 
      var jiaodu=40*cishu; 


      kj.style.transform="rotateY("+jiaodu+"deg)translateZ(-275px)" 
    }

(kj)就是3d空間,點擊kj要是一種效果,就要有一種方法或步驟;
3d空間樣式rotateY(這就是上下軸旋轉)translateZ(Z這就是3d立體字軸;
讓3d空間后移275px找到軸心位置)

完畢 希望大家看到這篇文章后能夠學到知識。



主站蜘蛛池模板: 国产综合图区| 久草视频资源| 久久精品无码一区二区三区| 夜夜躁很很躁日日躁麻豆| 乱子伦视频在线看| 最近中文字幕免费视频| 久久国产色av| 波多野结衣在线网址| 亚洲 欧美 中文 日韩aⅴ| 国产嘿咻| 美国黄色毛片| 在线视频网站www色| 动漫成人无码免费视频在线播| 日韩中文字幕不卡| a男人的天堂久久a毛片| 2019精品手机国产品在线| 国产成人无码18禁午夜福利p| av免费不卡国产观看| 亚洲成在人网站av天堂| 国产又滑又嫩又白| 免费观看黄色小视频| 久久久久久a亚洲欧洲av| 国产精品自在自线视频| 欧洲美熟女乱又伦av| 免费人成在线观看网站| 国内精品自国内精品66j影院| 中文字幕无码日韩欧毛| 2019中文字幕在线观看| 真实的国产乱xxxx在线| 精品国产一区二区三区在线观看 | 人妻熟女一区二区aⅴ图片| 国产在线精品一区| 久久99精品久久久大学生| 成人av动漫| 97精品国产一区二区三区| 亚洲国产日韩欧美高清片| 五月天激情婷婷婷久久| 日本三不卡|