CSS3 實(shí)現(xiàn)的加載動(dòng)畫(huà)
實(shí)現(xiàn)效果

實(shí)現(xiàn)代碼
<h1>腳本之家</h1>
<h3>JB51.net</h3>
<div class='loader loader1'>
<div>
<div>
<div>
<div>
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='loader loader2'>
<div>
<div>
<div>
<div>
<div>
<div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='loader loader3'>
<div>
<div>
<div>
<div>
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='loader loader4'>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
CSS3
@-webkit-keyframes rotate {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
50% {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes rotate {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
50% {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes rotate2 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-top-color: rgba(0, 0, 0, 0.5);
}
50% {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
border-top-color: rgba(0, 0, 255, 0.5);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
border-top-color: rgba(0, 0, 0, 0.5);
}
}
@keyframes rotate2 {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border-top-color: rgba(0, 0, 0, 0.5);
}
50% {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
border-top-color: rgba(0, 0, 255, 0.5);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
border-top-color: rgba(0, 0, 0, 0.5);
}
}
* {
box-sizing: border-box;
}
body {
background: #f9f9f9;
padding-bottom: 100px;
}
h1, h3 {
display: block;
margin: 0px auto;
text-align: center;
font-family: 'Tahoma';
font-weight: lighter;
color: rgba(0, 0, 0, 0.5);
letter-spacing: 1.5px;
}
h1 {
margin: 50px auto;
}
.loader {
position: relative;
margin: 75px auto;
width: 150px;
height: 150px;
display: block;
overflow: hidden;
}
.loader div {
height: 100%;
}
/* loader 1 */
.loader1, .loader1 div {
border-radius: 50%;
padding: 8px;
border: 2px solid transparent;
-webkit-animation: rotate linear 3.5s infinite;
animation: rotate linear 3.5s infinite;
border-top-color: rgba(0, 0, 0, 0.5);
border-bottom-color: rgba(0, 0, 255, 0.5);
}
/*loader 2 */
.loader2, .loader2 div {
border-radius: 50%;
padding: 8px;
border: 2px solid transparent;
-webkit-animation: rotate linear 3.5s infinite;
animation: rotate linear 3.5s infinite;
border-top-color: rgba(0, 0, 255, 0.5);
border-left-color: rgba(0, 0, 0, 0.5);
border-right-color: rgba(0, 0, 0, 0.5);
}
/*loader 3 */
.loader3, .loader3 div {
border-radius: 50%;
padding: 8px;
border: 2px solid transparent;
-webkit-animation: rotate linear 3.5s infinite;
animation: rotate linear 3.5s infinite;
border-top-color: rgba(0, 0, 0, 0.5);
border-left-color: rgba(0, 0, 255, 0.5);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.38, 0.21, 0.88);
animation-timing-function: cubic-bezier(0.55, 0.38, 0.21, 0.88);
-webkit-animation-duration: 3s;
animation-duration: 3s;
}
/* loader 4 */
.loader4, .loader4 div {
border-radius: 50%;
padding: 8px;
border: 2px solid transparent;
-webkit-animation: rotate linear 3.5s infinite;
animation: rotate linear 3.5s infinite;
border-radius: 50%;
padding: 4px;
-webkit-animation: rotate2 4s infinite linear;
animation: rotate2 4s infinite linear;
}
div:hover {
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.loader, .loader * {
will-change: transform;
}
以上就是CSS3 實(shí)現(xiàn)的加載動(dòng)畫(huà)的詳細(xì)內(nèi)容,更多關(guān)于CSS3 加載動(dòng)畫(huà)的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
純CSS3進(jìn)度條漸變加載特效代碼是一款基于css3 keyframes制作的創(chuàng)意有趣的進(jìn)度條漸變加載loading動(dòng)畫(huà)特效代碼。2020-11-16
純css3巫師法術(shù)加載特效代碼是一款創(chuàng)意的漫畫(huà)人物loading加載圖標(biāo)動(dòng)畫(huà)特效代碼。2020-11-12
一組純css3加載圖標(biāo)動(dòng)畫(huà)特效代碼大全
一組純css3加載圖標(biāo)動(dòng)畫(huà)特效代碼大全是一款8種不同效果的loading加載動(dòng)畫(huà),基于css3 keyframes屬性制作的。2020-11-09
純css3加載loading發(fā)光變色動(dòng)畫(huà)特效代碼
純css3加載發(fā)光變色動(dòng)畫(huà)特效是一款基于css3 keyframes屬性實(shí)現(xiàn)的發(fā)光變色圓點(diǎn)串聯(lián)旋轉(zhuǎn)loading加載動(dòng)畫(huà)特效2020-11-09
純css3制作的發(fā)光loading圖標(biāo)加載動(dòng)畫(huà)特效源碼
是一段基于純CSS3實(shí)現(xiàn)的發(fā)光的圓角框里面嵌入loading圖標(biāo)加載動(dòng)畫(huà)效果代碼,非常符合現(xiàn)在人們的審美模式,采用了平滑模板效果,非常好看,歡迎有興趣的朋友前來(lái)下載使用2020-10-29
CSS3實(shí)現(xiàn)漸變的loading加載進(jìn)度條特效代碼
css3 keyframes制作創(chuàng)意有趣的進(jìn)度條漸變加載動(dòng)畫(huà),loading進(jìn)度條動(dòng)畫(huà)特效,非常不錯(cuò),喜歡的朋友快來(lái)下載吧2020-10-21
jQuery+CSS3實(shí)現(xiàn)的雙層圓環(huán)形進(jìn)度條加載動(dòng)畫(huà)特效
是一段基于jQuery+CSS3實(shí)現(xiàn)的雙層圓環(huán)形狀進(jìn)度條加載動(dòng)畫(huà)特效,雙層圓環(huán)中心還包含著數(shù)字百分比顯示,非常不錯(cuò),適應(yīng)于所有網(wǎng)頁(yè)使用,歡迎興趣的朋友前來(lái)下載2020-08-17
CSS3+SVG實(shí)現(xiàn)的電影攝影機(jī)loading加載動(dòng)畫(huà)效果源碼
這是一款基于CSS3+SVG實(shí)現(xiàn)的電影攝影機(jī)loading加載動(dòng)畫(huà)效果源碼。畫(huà)面中心是一個(gè)攝像機(jī)磁帶旋轉(zhuǎn)的卡通動(dòng)畫(huà)效果,攝像機(jī)支架下方還配有l(wèi)oading字母標(biāo)志,構(gòu)成了一個(gè)比較經(jīng)典2020-03-06
純CSS3 實(shí)現(xiàn)的速度儀表盤(pán)加載動(dòng)畫(huà)效果源碼
這是一款基于純CSS3 實(shí)現(xiàn)的速度儀表盤(pán)加載動(dòng)畫(huà)效果源碼。畫(huà)面中心是一個(gè)速度數(shù)值變換顯示的儀表盤(pán),儀表盤(pán)上的指針間歇的變換顯示加速狀態(tài),待到加速到最大時(shí)顯示回零。同2020-02-24
CSS3實(shí)現(xiàn)的彩色粗線條愛(ài)心形狀加載動(dòng)畫(huà)特效源碼
是一段基于css3 animation屬性制作的彩色的粗線條愛(ài)心形狀加載動(dòng)畫(huà)特效,非常有意思,歡迎有興趣的朋友前來(lái)下載使用2019-11-28











