CSS濾鏡實(shí)現(xiàn)的顏色漸變翻轉(zhuǎn)效果
2014/10/10 20:43:56來(lái)源:三聯(lián)
一下是利用CSS濾鏡效果實(shí)現(xiàn)漸變翻轉(zhuǎn)的代碼,有需要的朋友可以參考下。
代碼如下:
<span style="font-size:14px;"><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css" media="screen">
.ddf{
margin: 0 auto;
width:150px;
height:125px;
background:#92B901;
color:#ffffff;
font-weight:bold;
font:12px '微軟雅黑', Verdana, Arial, Helvetica, sans-serif;
padding:20px 10px 0px 10px;
-moz-transition-property:width,height,-o-transform,background,font-size,opacity;
-moz-transition-duration:1s,1s,1s,1s,1s,1s;
<span style="color:#FF0000;">transition-property:width,height,transform,background,font-size,opacity;</span>
<span style="color:#FF0000;">transition-duration:1s,1s,1s,1s,1s,1s</span>;
border-radius:5px;
opacity:0.4;
}
.ddf:hover{
-moz-transform: rotate(360deg);
transform: rotate(360deg);
opacity:1;
background:#1ec7e6;
width:90px;
height:60px;
font-size:16px;
}
</style>
</head>
<body>
<div class="ddf">轉(zhuǎn)著好玩</div>
</body>
</html>
CSS中transform: rotate(<span style="color:#FF0000;">360deg</span>);旋轉(zhuǎn),默認(rèn)順時(shí)針旋轉(zhuǎn)參數(shù)為度數(shù)例如:360deg
</span><pre name="code" class="html"><span style="font-size:14px;">transition-property:過(guò)濾,后面接需要過(guò)濾的屬性例如:</span><span style="font-size:14px;">width,height,transform,background,font-size,</span><span style="font-size:14px;"></span>
<span style="font-size:14px;">transition-duration:后面接相應(yīng)過(guò)濾屬性的執(zhí)行時(shí)間。</span><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;">opacity:</span>規(guī)定不透明度。從 0.0 (完全透明)到 1.0(完全不透明)。
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css" media="screen">
.ddf{
margin: 0 auto;
width:150px;
height:125px;
background:#92B901;
color:#ffffff;
font-weight:bold;
font:12px '微軟雅黑', Verdana, Arial, Helvetica, sans-serif;
padding:20px 10px 0px 10px;
-moz-transition-property:width,height,-o-transform,background,font-size,opacity;
-moz-transition-duration:1s,1s,1s,1s,1s,1s;
<span style="color:#FF0000;">transition-property:width,height,transform,background,font-size,opacity;</span>
<span style="color:#FF0000;">transition-duration:1s,1s,1s,1s,1s,1s</span>;
border-radius:5px;
opacity:0.4;
}
.ddf:hover{
-moz-transform: rotate(360deg);
transform: rotate(360deg);
opacity:1;
background:#1ec7e6;
width:90px;
height:60px;
font-size:16px;
}
</style>
</head>
<body>
<div class="ddf">轉(zhuǎn)著好玩</div>
</body>
</html>
CSS中transform: rotate(<span style="color:#FF0000;">360deg</span>);旋轉(zhuǎn),默認(rèn)順時(shí)針旋轉(zhuǎn)參數(shù)為度數(shù)例如:360deg
</span><pre name="code" class="html"><span style="font-size:14px;">transition-property:過(guò)濾,后面接需要過(guò)濾的屬性例如:</span><span style="font-size:14px;">width,height,transform,background,font-size,</span><span style="font-size:14px;"></span>
<span style="font-size:14px;">transition-duration:后面接相應(yīng)過(guò)濾屬性的執(zhí)行時(shí)間。</span><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;"></span><pre name="code" class="html"><span style="font-size:14px;">opacity:</span>規(guī)定不透明度。從 0.0 (完全透明)到 1.0(完全不透明)。
[教程作者:佚名]
免責(zé)聲明:本站文章系圖趣網(wǎng)整理發(fā)布,如需轉(zhuǎn)載,請(qǐng)注明出處,素材資料僅供個(gè)人學(xué)習(xí)與參考,請(qǐng)勿用于商業(yè)用途!
本文地址:http://m.likemindfilms.com/tutorial/wd2418.html
本文地址:http://m.likemindfilms.com/tutorial/wd2418.html
您可能還喜歡
- jquery Jcrop圖像裁切插件中文api文檔
- @media適配不同尺寸的手機(jī)
- 返回上一頁(yè)代碼的幾種寫(xiě)法
- Dreamweaver CC 2014新功能介紹
- 深入了解viewport和px
- 優(yōu)秀CSS代碼書(shū)寫(xiě)的10個(gè)規(guī)范
- 畫(huà)出你的風(fēng)格:HTML5創(chuàng)意畫(huà)板的設(shè)計(jì)教程
- Div中height:100%無(wú)效的解決辦法
- 網(wǎng)頁(yè)前端-網(wǎng)頁(yè)切圖命名規(guī)范
- 為網(wǎng)頁(yè)設(shè)計(jì)師而生的14個(gè)文本編輯器
這些是最新的
- 專(zhuān)訪:石墨文檔產(chǎn)品總監(jiān)羅穎
- UI設(shè)計(jì)不得不知的移動(dòng)端UI尺寸適
- 光音移動(dòng)設(shè)計(jì)規(guī)范 — 表單類(lèi)
- 體驗(yàn)設(shè)計(jì)中的排序問(wèn)題
- 網(wǎng)頁(yè)設(shè)計(jì)精粹 網(wǎng)頁(yè)中那些迷人的按
- aliued:響應(yīng)式設(shè)計(jì)的現(xiàn)狀與趨勢(shì)
- 10個(gè)智能對(duì)象處理的ps技巧
- 網(wǎng)頁(yè)UI - 原子設(shè)計(jì)理論(上)
- 如何通過(guò)設(shè)計(jì)提升banner點(diǎn)擊率?
- 晉小彥視覺(jué)設(shè)計(jì)系列文章(二):全屏
最熱門(mén)的教程