8种鼠标悬停的按钮特效

8种鼠标悬停的按钮特效

添加时间:2021-02-09 15:46:04
站长推荐丨赞助论坛,可获取海量资源终身免费下载权限奥!
举报 举报
收藏
预览
附件 附件
  • 模板类型模板类型:按钮
  • 模板颜色模板颜色:初级
  • 下载积分下载积分:28 米粒
  • 下载权限下载权限:

    赞助会员

一款8种鼠标悬停的按钮特效,每一个按钮的鼠标悬停特效都有不同的动画效果,个人比较喜欢这种风格的按钮,比较简洁大气,喜欢的童鞋请收下吧。
8种鼠标悬停的按钮特效
分类:html/css > 按钮 难易:初级

页面的head部分,需远程调用font-awesome图标字体库,然后设置好页面元素的样式,代码如下:

<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css'>
<style>
*, *:before, *:after {
  box-sizing: border-box;
}

.buttons {
  text-align: center;
  margin-top: 25px;
}
.buttons a.button {
  display: inline-block;
  margin: 25px;
  background: #00a5ec;
  color: white;
  padding: 20px;
  text-decoration: none;
  font-family: 'Microsoft YaHei','Lantinghei SC','Open Sans',Arial,'Hiragino Sans GB','STHeiti','WenQuanYi Micro Hei','SimSun',sans-serif;
  position: relative;
  transition: .25s ease-in-out;
  border-radius: 3px;
}
.buttons a.button:before, .buttons a.button:after, .buttons a.button span {
  transition: .25s ease-in-out;
}
.buttons a.button.location {
  position: relative;
  overflow: hidden;
}
.buttons a.button.location span {
  display: block;
  position: relative;
  bottom: 0px;
}
.buttons a.button.location:before {
  content: '\f124';
  font-family: FontAwesome;
  display: block;
  width: 100%;
  height: 100%;
  padding: 20px;
  top: -100%;
  left: 0;
  position: absolute;
}
.buttons a.button.location:hover {
  background: #0944af;
}
.buttons a.button.location:hover span {
  bottom: -56px;
}
.buttons a.button.location:hover:before {
  top: 0%;
}
.buttons a.button.mail {
  position: relative;
  overflow: hidden;
}
.buttons a.button.mail span {
  display: block;
  position: relative;
  bottom: 0px;
}
.buttons a.button.mail:before {
  content: '\f1d8';
  font-family: FontAwesome;
  display: block;
  width: 100%;
  height: 100%;
  padding: 20px;
  top: -100%;
  left: 0;
  position: absolute;
}
.buttons a.button.mail:hover {
  background: #53af09;
}
.buttons a.button.mail:hover span {
  bottom: -56px;
}
.buttons a.button.mail:hover:before {
  top: 0%;
}
.buttons a.button.delete {
  position: relative;
  overflow: hidden;
}
.buttons a.button.delete span {
  display: block;
  position: relative;
  bottom: 0px;
}
.buttons a.button.delete:before {
  content: '\f1f8';
  font-family: FontAwesome;
  display: block;
  width: 100%;
  height: 100%;
  padding: 20px;
  top: -100%;
  left: 0;
  position: absolute;
}
.buttons a.button.delete:hover {
  background: #cb3017;
}
.buttons a.button.delete:hover span {
  bottom: -56px;
}
.buttons a.button.delete:hover:before {
  top: 0%;
}
.buttons a.button.glossy {
  overflow: hidden;
}
.buttons a.button.glossy:after {
  content: '\f054';
  font-family: FontAwesome;
  margin-left: 20px;
  position: relative;
  z-index: 2;
  color: white;
}
.buttons a.button.glossy:before {
  content: '';
  display: block;
  position: absolute;
  right: 0px;
  top: -10px;
  height: 200px;
  width: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(15deg);
}
.buttons a.button.glossy:hover {
  background: #0094d4;
}
.buttons a.button.glossy:hover:before {
  width: 80%;
  background: rgba(255, 255, 255, 0.15);
}
.buttons a.button.zoom {
  background: #00a5ec;
  color: #00a5ec;
  box-shadow: inset 0 0px 0 50px #d4f2ff;
}
.buttons a.button.zoom:after {
  content: '\f054';
  font-family: FontAwesome;
  margin-left: 20px;
  position: relative;
  z-index: 2;
  color: #00a5ec;
}
.buttons a.button.zoom:hover {
  box-shadow: inset 0 0px 0 0px #d4f2ff;
  color: white;
}
.buttons a.button.zoom:hover:after {
  color: white;
}
.buttons a.button.wiggle:after {
  content: '\f054';
  font-family: FontAwesome;
  display: inline-block;
  max-width: 0;
  margin-left: 0px;
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0);
  left: -50px;
}
.buttons a.button.wiggle:hover {
  background: #0094d4;
}
.buttons a.button.wiggle:hover:after {
  max-width: 100px;
  margin-left: 20px;
  left: 0px;
  color: white;
  animation: wiggle 1s .25s ease-in-out infinite;
}
.buttons a.button.flood {
  background: rgba(0, 165, 236, 0.2);
  color: #00a5ec;
  box-shadow: inset 0 0px 0 -30px rgba(0, 255, 236, 0.4);
}
.buttons a.button.flood:after {
  content: '\f054';
  font-family: FontAwesome;
  margin-left: 20px;
  position: relative;
  z-index: 2;
  color: #00a5ec;
}
.buttons a.button.flood:hover {
  box-shadow: inset 0 -90px 0 -30px #00a5ec;
  color: white;
}
.buttons a.button.flood:hover:after {
  color: white;
}
.buttons a.button.slide-right {
  box-shadow: inset -200px 0 0 -20px rgba(0, 0, 0, 0.3);
}
.buttons a.button.slide-right:after {
  content: '\f054';
  font-family: FontAwesome;
  margin-left: 20px;
  position: relative;
  z-index: 2;
  color: #00a5ec;
}
.buttons a.button.slide-right:hover {
  box-shadow: inset -73px 0 0 -20px rgba(0, 0, 0, 0.3);
}
.buttons a.button.slide-right:hover:after {
  color: white;
  margin-left: 40px;
}

@keyframes wiggle {
  0% {
    margin-left: 20px;
    margin-right: 0px;
  }
  50% {
    margin-left: 16px;
    margin-right: 4px;
  }
  100% {
    margin-left: 20px;
    margin-right: 0px;
  }
}
</style>

页面的body部分,这里用a标签来设置按钮,8个a标签放入一个div容器里即可,代码如下:

<div class="buttons">
  <a href="#" class="button slide-right">左侧滑入</a>
  <a href="#" class="button flood">底部淹没</a>
  <a href="#" class="button wiggle">箭头摆动</a>
  <a href="#" class="button zoom">缩放填充</a>
  <br>
  <a href="#" class="button glossy">右侧斜切</a>
  <a href="#" class="button delete"><span>删除图标</span></a>
  <a href="#" class="button mail"><span>邮件图标</span></a>
  <a href="#" class="button location"><span>位置图标</span></a>
</div>
相关内容推荐
资源求助发帖
查看更多发帖

*

回帖描述:

*

链接类型:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
热点内容推荐
标题:8种鼠标悬停的按钮特效

*

描述:
平均回复时间:3-10分钟
规则介绍:悬赏寻求论坛网友分享资源,站点对分享内容的准确性,合法性,版权等没有足够的监管能力。如果您发现资源不正确,无法使用,不符合法律法律等情况,您可以直接举报资源。站长将尽快核实您的举报,并根据情况,采取封号,退换米粒等处理。

*

回帖描述:

*

链接类型:

*

阅读权限:

*

下载链接:

密码:
发帖规则:回帖内容为会员之间的私信,普通网友无法查看。
免责声明:回帖中提供的链接内容仅供会员之间学习参考使用,获取内容后请在法律法规范围内使用。回帖提供的内容应符合法律法规要求,不得违反法律法律的要求。
站点权责:回帖内容如违反法律法规,站点有权封停账号使用权利。对用户举报的内容,站点有责任及时删除违规内容。
  • 背景波浪
  • 背景波浪
  • 波浪
  • 波浪
客服
在线咨询
周一 至 周日 9:00 ~ 22:00
QQ:1326974360
微信:juyoubuluo6688
客服热线
18205485173
工作日 9:00 ~ 18:00
微信扫码咨询
客户服务
欢迎咨询服务
咨询量较多时,请耐心等待
社群

关注公众号

获取更多资讯

扫码进群(QQ)

与更多大牛交流沟通

0.089052s