国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

CSS3實現漂亮的按鈕動畫

2024-07-11 09:01:13
字體:
來源:轉載
供稿:網友

 Chrome下效果理想,Firefox,IE9下沒有動畫效果。

CSS代碼片段
.button, .button:visited{
background:#222 url(overlay.png) repeat-x;
display:inline-block;
padding:5px 10px 6px;
color:#fff;
text-decoration:none;
/*border-radius*/
-webkit-border-radius:6px;
-moz-border-radius:6px;
border-radius:6px;
/*box-shadow*/
-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.6);
-moz-box-shadow:0 1px 3px rgba(0,0,0,0.6);
box-shadow:0 1px 3px rgba(0,0,0,0.6);
text-shadow:0 -1px 1px rgba(0,0,0,0.25);
border-bottom:1px solid rgba(0,0,0,0.25);
position:relative;
cursor:pointer;
}
.button:hover{
background-color:#111;
color:#fff;
/*animation-duration*/
-webkit-animation-duration:2s;
-moz-animation-duration:2s;
-ms-animation-duration:2s;
-o-animation-duration:2s;
animation-duration:2s;
/*animation-timing-function*/
-webkit-animation-timing-function:ease-out;
-moz-animation-timing-function:ease-out;
-ms-animation-timing-function:ease-out;
-o-animation-timing-function:ease-out;
animation-timing-function:ease-out;
/*animation-iteration-count*/
-webkit-animation-iteration-count:infinite;
-moz-animation-iteration-count:infinite;
-ms-animation-iteration-count:infinite;
-o-animation-iteration-count:infinite;
animation-iteration-count:infinite;
}
/*定義動畫*/
@-webkit-keyframes greenPulse{
from { background-color:#91bd09;
/*box-shadow*/
-webkit-box-shadow:0 0 9px #333;
-moz-box-shadow:0 0 9px #333;
box-shadow:0 0 9px #333;
}
50%{
background-color:#B4E02C;
/*box-shadow*/
-webkit-box-shadow:0 0 18px #91bd09;
-moz-box-shadow:0 0 18px #91bd09;
box-shadow:0 0 18px #91bd09;
}
to{
background-color:#91bd09;
/*box-shadow*/
-webkit-box-shadow:0 0 9px #333;
-moz-box-shadow:0 0 9px #333;
box-shadow:0 0 9px #333;
}
}
.green.button, .green.button:visited{
background-color:#91bd09;
}
.green.button:hover{
/*animation-name*/
-webkit-animation-name:greenPulse;
-moz-animation-name:greenPulse;
-ms-animation-name:greenPulse;
-o-animation-name:greenPulse;
animation-name:greenPulse;
}
HTML代碼片段
<ul>
<li>
<a class="button magenta super" href="#">按鈕</a>
<a class="button green super" href="#">按鈕</a>
<a class="button red super" href="#">按鈕</a>
<a class="button orange super" href="#">按鈕</a>
<a class="button blue super" href="#">按鈕</a>
<a class="button yellow super" href="#">按鈕</a>
</li>
<li>
<input type="button" class="button magenta super" value="按鈕" />
<input type="button" class="button green super" value="按鈕" />
<input type="button" class="button red super" value="按鈕" />
<input type="button" class="button orange super" value="按鈕" /> 

input type="button" class="button blue super" value="按鈕" / input type="button" class="button yellow super" value="按鈕" / /li /ul
 
 
 


<input type="button" class="button blue super" value="按鈕" />
<input type="button" class="button yellow super" value="按鈕" />
</li>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 八宿县| 凤庆县| 和田县| 家居| 惠来县| 小金县| 江安县| 新巴尔虎右旗| 龙游县| 沅陵县| 普宁市| 宁武县| 肥西县| 双辽市| 攀枝花市| 阿荣旗| 古交市| 平泉县| 延安市| 长寿区| 荥阳市| 库伦旗| 淄博市| 麻阳| 雅安市| 凤翔县| 凤城市| 德州市| 黎平县| 钟祥市| 汝阳县| 南安市| 罗田县| 桃源县| 谷城县| 葫芦岛市| 秦皇岛市| 勐海县| 武汉市| 岚皋县| 南开区|