如何使用纯css3实现的鼠标悬停动画按钮(CSS3,web开发)

时间:2024-05-05 06:40:37 作者 : 石家庄SEO 分类 : web开发
  • TAG :

    %E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E7%BA%AFcss3%E5%AE%9E%E7%8E%B0%E7%9A%84%E9%BC%A0%E6%A0%87%E6%82%AC%E5%81%9C%E5%8A%A8%E7%94%BB%E6%8C%89%E9%92%AE

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实现的鼠标悬停动画按钮的详细内容,希望对您有所帮助,信息来源于网络。
上一篇:Android中内存泄漏的注意点有哪些下一篇:

9 人围观 / 0 条评论 ↓快速评论↓

(必须)

(必须,保密)

阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18