DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> CSS入門知識 >> DIV十CSS布局 >> 布局實例 >> CSS濾鏡實現的顏色漸變翻轉效果
CSS濾鏡實現的顏色漸變翻轉效果
編輯:布局實例     

 一下是利用CSS濾鏡效果實現漸變翻轉的代碼,有需要的朋友可以參考下。

代碼如下: <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">轉著好玩</div>
</body>
</html>
CSS中transform: rotate(<span style="color:#FF0000;">360deg</span>);旋轉,默認順時針旋轉參數為度數例如:360deg
</span><pre name="code" class="html"><span style="font-size:14px;">transition-property:過濾,後面接需要過濾的屬性例如:</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:後面接相應過濾屬性的執行時間。</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>規定不透明度。從 0.0 (完全透明)到 1.0(完全不透明)。
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved