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

首頁 > 開發 > CSS > 正文

純css3實現的鼠標懸停動畫按鈕

2024-07-11 08:30:14
字體:
來源:轉載
供稿:網友

今天給大家帶來一款純css3實現的鼠標懸停動畫按鈕。這款按鈕鼠標經過前以正方形的形式,當鼠標經過的時候以動畫的形式變成圓形。效果圖如下:

實現的代碼。

html代碼:


復制代碼
代碼如下:
<div>
<span></span>
</div>

css3代碼:


復制代碼
代碼如下:
body
{
background-color: #333;
}
div
{
width: 200px;
height: 200px;
margin: 0 auto;
}
span
{
position: relative;
width: 180px;
height: 180px;
display: block;
margin: auto;
top: 25px;
border: 20px solid rgba(255, 255, 0, .25);
background-color: rgba(124,155,13,1);
-webkit-transition: .5s;
-moz-transition: .5s;
-ms-transition: .5s;
transition: .5s;
border-radius: 30px 0px 30px 0px;
}
span:before, span:after
{
position: absolute;
display: block;
background-color: #fff;
border-radius: 10px;
margin: auto;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
span:before
{
width: 100px;
height: 10px;
content: "";
}
span:after
{
width: 10px;
height: 100px;
content: "";
}
div:hover span
{
-webkit-transform: scale(.5) rotate(45deg);
-moz-transform: scale(.5) rotate(45deg);
-ms-transform: scale(.5) rotate(45deg);
transform: scale(.5) rotate(45deg);
border-radius: 110px;
background-color: rgba(112,18,255,1);
}

非常棒的鼠標懸停特效吧,最重要的是完全是純CSS3來實現的,小伙伴們自由發揮下,用到自己的項目中去吧

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 衡东县| 新源县| 云梦县| 丽江市| 汝阳县| 望谟县| 扎囊县| 仁寿县| 类乌齐县| 建平县| 惠州市| 三河市| 新竹县| 阳原县| 迁西县| 长寿区| 肇东市| 大姚县| 油尖旺区| 津市市| 当阳市| 洪湖市| 武强县| 项城市| 新密市| 望江县| 富平县| 藁城市| 清远市| 马山县| 南溪县| 鄯善县| 丹寨县| 山阳县| 乐业县| 襄垣县| 肥乡县| 偏关县| 东兴市| 靖宇县| 宁河县|