CSS滤镜完成的色调渐变色旋转实际效果

日期:2021-01-20 类型:科技新闻 

关键词:制作小程序,小程序商城,扫码点餐小程序,微信小程序开店的步骤,牛刀小程序

1下是运用CSS滤镜实际效果完成渐变色旋转的编码,有必须的盆友能够参照下。


拷贝编码
编码以下:
<span style="font-size:14px;"><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF⑻">
<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(彻底不全透明)。