您當(dāng)前位置:圖趣網(wǎng)(Tuquu) >> 網(wǎng)頁(yè)設(shè)計(jì)教程 >> 移動(dòng)前端 >> 瀏覽設(shè)計(jì)教程

CSS濾鏡實(shí)現(xiàn)的顏色漸變翻轉(zhuǎ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(完全不透明)。
[教程作者:佚名]
免責(zé)聲明:本站文章系圖趣網(wǎng)整理發(fā)布,如需轉(zhuǎn)載,請(qǐng)注明出處,素材資料僅供個(gè)人學(xué)習(xí)與參考,請(qǐng)勿用于商業(yè)用途!
本文地址:http://m.likemindfilms.com/tutorial/wd2418.html
屏蔽雙擊選中文字的方法兼容FF及以外的瀏覽器
css sprite技術(shù)解析
圖趣網(wǎng)微信
建議反饋
×