溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

初識css3動畫

發(fā)布時間:2020-07-19 00:40:30 來源:網(wǎng)絡(luò) 閱讀:299 作者:沉迷學(xué)習(xí)中 欄目:開發(fā)技術(shù)

<!doctype html>

<html lang="en">


<head>

<meta charset="UTF-8">

<title>動畫初識</title>

<style type="text/css">


*{

padding:0;

margin: 0;

}

li,ul,a{

text-decoration: none;

list-style: none;

}

#parent{

width: 100%;

overflow: hidden;

}

#parent>img{

position: absolute;

}

#parent ul{

position: absolute;

top: 60%;

left: 8%;

}

#parent li{

float:  left;

border: 5px solid #CCCCCC;

width: 200px;

height: 300px;

margin: 10px;

text-align: center;

line-height: 300px;

color: #EEEE00;

font-size: 20px;

position: relative;

cursor: pointer;

background: linear-gradient(0deg, #FFB6C1 20%, #FFB5C5 50%,#FFAEB9 80%);

z-index: 9999;

}

#son a{

position: absolute;

border:10px solid #F0FFFF;

border-radius: 50%;

width:150px;

height: 140px;

display: block;

top: -50px;

left: 16px;

overflow: hidden;

}

#son a img{

position: absolute;

top: 0px;

left: -10px;

}

#son a div{

position: relative;

}

#son a:hover div{

background: rgba(225,225,225,0.4);

z-index: 99;

}

.bg1:target{

z-index: 999;

}


@keyframes pinghua{

0%{

left:-1500px;

}

100%{

left: 0;

}

}

#bg1:target{

animation:pinghua 1s 0s 1;

}

#bg2:target{

animation:XZ 1s 0s 1;

}

#bg3:target{

animation:Da 1s 0s 1;

}

@keyframes XZ{

0%{

transform:rotate(360deg);

}

100%{

transform:rotate(0deg);

}

}

@keyframes Da{

0%{

transform:scale(0);

}

100%{

transform:scale(1);

}

}

</style>

</head>

<body>

<div id="parent">

<img id="bg1" class="bg1 pinghua" src="p_w_picpaths/bg_1.jpg" width=1920 height=1010/>

<img id="bg2" class="bg1 XZ" src="p_w_picpaths/bg_2.jpg" width=1920 height=1010/>

<img id="bg3" class="bg1 Da" src="p_w_picpaths/bg_3.jpg" width=1920 height=1010/>

<ul id="son">

<li>


<a href="#bg1">

<img src="p_w_picpaths/bg_1.jpg" width=180 height=140/>

<div ></div>

</a>^初音未來^</li>

<li>

<a href="#bg2">

<img src="p_w_picpaths/bg_2.jpg" width=180 height=140/>

<div ></div>

</a>

^小蘿莉^</li>

<li>

<a href="#bg3" >

<img src="p_w_picpaths/bg_3.jpg" width=180 height=140/>

<div ></div>

</a>^小魔女^</li>

</ul>

</div>

</body>

</html>



向AI問一下細(xì)節(jié)
推薦閱讀:
  1. 初識UNIX
  2. puppet 初識

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI