1.transition動畫
站在用戶的角度思考問題,與客戶深入溝通,找到海曙網(wǎng)站設(shè)計與海曙網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗,讓設(shè)計與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個性化、用戶體驗好的作品,建站類型包括:做網(wǎng)站、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、主機(jī)域名、虛擬主機(jī)、企業(yè)郵箱。業(yè)務(wù)覆蓋海曙地區(qū)。
(1)transition-property 設(shè)置過渡的屬性,比如:width height background-color
(2)transition-duration 設(shè)置過渡的時間,比如:1s 500ms
(3)transition-timing-function 設(shè)置過渡的運動方式,常用有l(wèi)inear(勻速)| ease(緩沖運動)
(4)transition-delay 設(shè)置動畫的延遲
(5)transition:property duration timing-function delay; 同時設(shè)置
<head>
<meta charset="utf-8">
<title>transition動畫</title>
<style type="text/css">
.box{
width: 100px;
height: 100px;
background-color: yellow;
transition: all 500ms ease,background-color 2s ease;
}
.box:hover{
width: 500px;
height: 500px;
background-color: red;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
例子二:圖片說明文字
<head>
<meta charset="utf-8">
<title>圖片</title>
<style type="text/css">
.box{
width: 320px;
height: 405px;
margin: 50px auto 0;
position: relative;
overflow: hidden;
}
.text{
width: 320px;
height: 100px;
position: absolute;
top: 405px;
background-color: rgba(124,119,119,0.30);
transition: all 500ms ease;
}
.box:hover .text{
position: absolute;
top: 305px;
}
</style>
</head>
<body>
<div class="box">
<img src="images/3_02.png" alt="星空">
<div class="text">
<h4>夜空中最亮的星</h4>
<p>我在思考人生</p>
</div>
</div>
</body>
例子三:夏目
<head>
<meta charset="utf-8">
<title>joke</title>
<style type="text/css">
@keyframes joke{
from{
left: 0px;
}
to{
left: -2136px; /*圖片寬度*/
}
}
.box{
width: 534px;
height: 300px;
margin: 50px auto;
overflow: hidden;
position: relative;
}
.box img{
position: absolute;
animation: joke 1s steps(4) infinite;
}
</style>
</head>
<body>
<div class="box">
<img src="images/xia.png" alt="夏目友人帳">
</div>
</body>
網(wǎng)頁名稱:CSS3transition動畫
當(dāng)前地址:http://aaarwkj.com/article2/jjphoc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供、響應(yīng)式網(wǎng)站、搜索引擎優(yōu)化、云服務(wù)器、自適應(yīng)網(wǎng)站、商城網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)