一款利用純css3實(shí)現(xiàn)的win8加載動畫的實(shí)例分析
發(fā)布時(shí)間:2014-12-11 09:38:35 作者:佚名
我要評論

之前已經(jīng)和大家分享了很多css3動畫的實(shí)例教程,今天給大家分享一款純css3實(shí)現(xiàn)的win8加載動畫。在這款實(shí)例中動畫效果完全由css3實(shí)現(xiàn),需要的朋友可以參考下
今天給大家分享一款純css3實(shí)現(xiàn)的win8加載動畫。在這款實(shí)例中動畫效果完全由css3實(shí)現(xiàn)。一起看下效果圖:
實(shí)現(xiàn)的代碼。
html代碼:
XML/HTML Code復(fù)制內(nèi)容到剪貼板
- <div class="wrapp">
- <div class="text">
- <h1>
- Windows 8</h1>
- </div>
- <div class="logo">
- <span class="top-left"></span><span class="bottom-right"></span>
- </div>
- </div>
css3代碼:
CSS Code復(fù)制內(nèi)容到剪貼板
- body{
- margin: 0;
- padding: 0;
- background-color: #90da15;
- }
- .wrapp{
- position: absolute;
- top: 50%;
- left: 50%;
- width: 600px;
- height: 300px;
- margin: -150px 0 0 -300px;
- -webkit-perspective: 30px;
- -webkit-transform: translateX(0px);
- -webkit-animation: wrapp 400ms 800ms ease-in forwards;
- -moz-perspective: 30px;
- -moz-transform: translateX(0px);
- -moz-animation: wrapp 400ms 800ms ease-in forwards;
- -ms-perspective: 30px;
- -ms-transform: translateX(0px);
- -ms-animation: wrapp 400ms 800ms ease-in forwards;
- perspective: 30px;
- transform: translateX(0px);
- animation: wrapp 400ms 800ms ease-in forwards;
- }
- .text{
- position: absolute;
- top: 50%;
- left: 50%;
- width: 0px;
- height: 60px;
- margin: -30px 0 0 -160px;
- overflow: hidden;
- -webkit-transform: translateX(0px);
- -webkit-animation: text 400ms 800ms linear forwards;
- -moz-transform: translateX(0px);
- -moz-animation: text 400ms 800ms linear forwards;
- -ms-transform: translateX(0px);
- -ms-animation: text 400ms 800ms linear forwards;
- transform: translateX(0px);
- animation: text 400ms 800ms linear forwards;
- }
- h1{
- float: rightright;
- font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
- font-weight: normal;
- color: #fff;
- padding: 0;
- margin: 0;
- width: 320px;
- height: 60px;
- font-size: 60px;
- line-height: 60px;
- }
- .logo{
- position: absolute;
- top: 50%;
- left: 50%;
- width: 90px;
- height: 90px;
- margin: -45px 0 0 -45px;
- background-color: #fff;
- -webkit-transform: translateX(0px) rotateY(10deg);
- -webkit-animation: logo 500ms 300ms ease-out forwards;
- -moz-transform: translateX(0px) rotateY(10deg);
- -moz-animation: logo 500ms 300ms ease-out forwards;
- -ms-transform: translateX(0px) rotateY(10deg);
- -ms-animation: logo 500ms 300ms ease-out forwards;
- transform: translateX(0px) rotateY(10deg);
- animation: logo 500ms 300ms ease-out forwards;
- }
- .logo .top-left{
- position: absolute;
- top: 0;
- left: 0;
- width: 44px;
- height: 44px;
- border-right: solid 2px #90da15;
- border-bottom: solid 2px #90da15;
- }
- .logo .bottombottom-rightright{
- position: absolute;
- bottombottom: 0;
- rightright: 0;
- width: 44px;
- height: 44px;
- border-left: solid 2px #90da15;
- border-top: solid 2px #90da15;
- }
- @-webkit-keyframes logo {
- from {
- -webkit-transform: translateX(0px) rotateY(10deg);
- }
- to {
- -webkit-transform: translateX(0px) rotateY(-10deg);
- }
- }
- @-webkit-keyframes text {
- from {
- width: 0px;
- -webkit-transform: translateX(0px);
- }
- 60%{
- width: 0px;
- }
- to {
- width: 320px;
- -webkit-transform: translateX(240px);
- }
- }
- @-webkit-keyframes wrapp {
- from {
- -webkit-transform: translateX(0px);
- }
- to {
- -webkit-transform: translateX(-200px);
- }
- }
- @-moz-keyframes logo {
- from {
- -moz-transform: translateX(0px) rotateY(10deg);
- }
- to {
- -moz-transform: translateX(0px) rotateY(-10deg);
- }
- }
- @-moz-keyframes text {
- from {
- width: 0px;
- -moz-transform: translateX(0px);
- }
- 60%{
- width: 0px;
- }
- to {
- width: 320px;
- -moz-transform: translateX(240px);
- }
- }
- @-moz-keyframes wrapp {
- from {
- -moz-transform: translateX(0px);
- }
- to {
- -moz-transform: translateX(-200px);
- }
- }
- @-ms-keyframes logo {
- from {
- -ms-transform: translateX(0px) rotateY(10deg);
- }
- to {
- -ms-transform: translateX(0px) rotateY(-10deg);
- }
- }
- @-ms-keyframes text {
- from {
- width: 0px;
- -ms-transform: translateX(0px);
- }
- 60%{
- width: 0px;
- }
- to {
- width: 320px;
- -ms-transform: translateX(240px);
- }
- }
- @-ms-keyframes wrapp {
- from {
- -ms-transform: translateX(0px);
- }
- to {
- -ms-transform: translateX(-200px);
- }
- }
- @keyframes logo {
- from {
- transform: translateX(0px) rotateY(10deg);
- }
- to {
- transform: translateX(0px) rotateY(-10deg);
- }
- }
- @keyframes text {
- from {
- width: 0px;
- transform: translateX(0px);
- }
- 60%{
- width: 0px;
- }
- to {
- width: 320px;
- transform: translateX(240px);
- }
- }
- @keyframes wrapp {
- from {
- transform: translateX(0px);
- }
- to {
- transform: translateX(-200px);
- }
- }
相關(guān)文章
CSS3 最強(qiáng)二維布局系統(tǒng)之Grid 網(wǎng)格布局
CS3的Grid網(wǎng)格布局是目前最強(qiáng)的二維布局系統(tǒng),可以同時(shí)對列和行進(jìn)行處理,將網(wǎng)頁劃分成一個(gè)個(gè)網(wǎng)格,可以任意組合不同的網(wǎng)格,做出各種各樣的布局,本文介紹CSS3 最強(qiáng)二維布局系2025-02-27- 本文介紹了如何使用CSS3的transform屬性和動畫技巧實(shí)現(xiàn)波浪式圖片墻,通過設(shè)置圖片的垂直偏移量,并使用動畫使其周期性地改變位置,可以創(chuàng)建出動態(tài)且具有波浪效果的圖片墻,同2025-02-27
CSS3模擬實(shí)現(xiàn)一個(gè)雷達(dá)探測掃描動畫特效(最新推薦)
文章介紹了如何使用CSS3實(shí)現(xiàn)一個(gè)雷達(dá)探測掃描的效果,包括夜色背景、蜘蛛網(wǎng)盤、掃描體的轉(zhuǎn)動效果、尾巴陰影以及被掃描到的光點(diǎn),通過HTML和CSS的配合,實(shí)現(xiàn)了豐富的動畫效果,2025-02-21- CSS3的Flexbox是一種強(qiáng)大的布局模式,通過設(shè)置display:flex可以輕松實(shí)現(xiàn)對齊、排列和分布網(wǎng)頁元素,它解決了傳統(tǒng)布局方法中的對齊、間距分配和自適應(yīng)布局等問題,接下來通過本2025-02-19
css3 實(shí)現(xiàn)icon刷新轉(zhuǎn)動效果
本文給大家介紹css3 實(shí)現(xiàn)icon刷新轉(zhuǎn)動效果,文章開頭給大家介紹了webkit-transform、animation、@keyframes這三個(gè)屬性,結(jié)合實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友一2025-02-19- CSS3過渡屬性用于實(shí)現(xiàn)元素從一種樣式平滑過渡到另一種樣式,通過設(shè)置transition-property過渡屬性、transition-duration過渡時(shí)長transition-timing-function過渡函數(shù)和trans2025-02-19
CSS3實(shí)現(xiàn)動態(tài)旋轉(zhuǎn)加載樣式的示例代碼
本文介紹了如何使用CSS3創(chuàng)建一個(gè)簡單的動態(tài)旋轉(zhuǎn)加載樣式,通過定義一個(gè)帶有類名“l(fā)oader”的HTML元素,并使用CSS樣式和@keyframes規(guī)則來實(shí)現(xiàn)旋轉(zhuǎn)動畫,你可以根據(jù)需要調(diào)整樣式2025-02-19使用CSS3實(shí)現(xiàn)平滑的過渡動畫效果(實(shí)例代碼)
這篇文章主要介紹了如何使用CSS3的transition屬性實(shí)現(xiàn)平滑的過渡動畫,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友一起看看吧2025-02-13CSS3中使用flex和grid實(shí)現(xiàn)等高元素布局的示例代碼
本文介紹了使用CSS3中的Flexbox和Grid布局實(shí)現(xiàn)等高元素布局的方法,通過簡單的兩列實(shí)現(xiàn)、每行放置3列以及全部代碼的展示,展示了這兩種布局方式的實(shí)現(xiàn)細(xì)節(jié)和效果,感興趣的朋2025-02-11使用CSS3和SVG創(chuàng)建圓形進(jìn)度條動畫效果
CSS3和SVG的結(jié)合使用為網(wǎng)頁設(shè)計(jì)帶來了創(chuàng)新的動態(tài)視覺效果,本文通過一個(gè)圓形進(jìn)度條的動畫特效示例,展示了如何利用CSS3的動畫功能和SVG的矢量圖形能力來創(chuàng)建豐富的用戶交互體2024-10-24