css3d 總結
3d transform (3D變形)(rotate skew scale translate)
基礎知識
perspective (視距,景深) perspective-origin 視點)
perspective (視距,景深) perspective-origin (視點)
(變形基點位置transform-origin
(3)transfrom-style:preserve-3d
3D旋轉圖片相簿
3d transform (3D變形)(rotate skew scale translate)3d transform (3D變形)(rotate skew scale translate)
景深) perspective-origin (視點)
(2) 變形基點位置transform-origin
html的程式碼:
<p> </p><p><img src="/static/imghwm/default1.png" data-src="img/p1.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p2.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p3.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p4.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p5.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p6.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p7.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p8.jpg" class="lazy" alt="css 3d 基礎知識" ></p> <p><img src="/static/imghwm/default1.png" data-src="img/p9.jpg" class="lazy" alt="css 3d 基礎知識" ></p>
首先要建造九個盒子放九張圖片,這個很容易理解的。
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空間,點擊kjjrejs的程式碼
rrreee(kj)就是3d空間,點擊kjjjs ;
3d空間樣式rotateY(這就是上下軸旋轉)translateZ(Z這就是3d立體字軸;讓3d空間後移275px找到軸心位置)更多css 3d 基礎知識 相關文章請關注PHP中文網!
對於Astro,我們可以在構建過程中生成大部分網站,但是有一小部分服務器端代碼可以使用Fuse.js之類的搜索功能來處理搜索功能。在此演示中,我們將使用保險絲搜索一組個人“書籤”


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

mPDF
mPDF是一個PHP庫,可以從UTF-8編碼的HTML產生PDF檔案。原作者Ian Back編寫mPDF以從他的網站上「即時」輸出PDF文件,並處理不同的語言。與原始腳本如HTML2FPDF相比,它的速度較慢,並且在使用Unicode字體時產生的檔案較大,但支援CSS樣式等,並進行了大量增強。支援幾乎所有語言,包括RTL(阿拉伯語和希伯來語)和CJK(中日韓)。支援嵌套的區塊級元素(如P、DIV),

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具

Dreamweaver CS6
視覺化網頁開發工具