HTML5+CSS3从入门到精通CSS3鼠标hover按钮过渡动画效果解析
沉沙 2018-07-09 来源 : 阅读 721 评论 0

摘要:这是一款CSS3鼠标hover按钮过渡动画效果。该CSS3鼠标hover按钮过渡动画效果共有两组效果,一组是按钮背景过渡动画效果,一组是按钮边框过渡动画效果。希望阅读本篇文章以后大家有所收获,帮助大家HTML5+CSS3从入门到精通 。

简要教程

这是一款CSS3鼠标hover按钮过渡动画效果。该CSS3鼠标hover按钮过渡动画效果共有两组效果,一组是按钮背景过渡动画效果,一组是按钮边框过渡动画效果。

 使用方法

在页面顶部<head>中引入hoverbuttons.css文件。

<link rel="stylesheet" href="css/hoverbuttons.css">                 

   

 HTML结构

为按钮或超链接元素添加相应的class类即可使用相应的hover过渡动画效果。

鼠标hover按钮背景过渡动画效果:

第一组:

<a href="#" class="hbtn hb-fill-on">Fade In</a>
<a href="#" class="hbtn hb-fill-top">Slide Up</a>
<a href="#" class="hbtn hb-fill-right">Slide Right</a>
<a href="#" class="hbtn hb-fill-bottom">Slide Down</a>
<a href="#" class="hbtn hb-fill-left">Slide Left</a>
<a href="#" class="hbtn hb-fill-middle">Slide Middle</a>
<a href="#" class="hbtn hb-fill-middle2">Slide Middle</a>
<a href="#" class="hbtn hb-fill-on-rev">Fade Out</a>
<a href="#" class="hbtn hb-fill-top-rev">Reveal Top</a>
<a href="#" class="hbtn hb-fill-right-rev">Reveal Right</a>
<a href="#" class="hbtn hb-fill-bottom-rev">Reveal Bottom</a>
<a href="#" class="hbtn hb-fill-left-rev">Reveal Left</a>
<a href="#" class="hbtn hb-fill-middle-rev">Reveal Middle</a>
<a href="#" class="hbtn hb-fill-middle2-rev">Reveal Middle</a>

   

第二组:

<a href="#" class="hbtn hb-fill-top-bg">Slide Up 2</a>
<a href="#" class="hbtn hb-fill-right-bg">Slide Right 2</a>
<a href="#" class="hbtn hb-fill-bottom-bg">Slide Down 2</a>
<a href="#" class="hbtn hb-fill-left-bg">Slide Left 2</a>
<a href="#" class="hbtn hb-fill-middle-bg">Slide Middle</a>
<a href="#" class="hbtn hb-fill-middle2-bg">Slide Middle</a>
<a href="#" class="hbtn hb-fill-top-rev-bg">Reveal Top 2</a>
<a href="#" class="hbtn hb-fill-right-rev-bg">Reveal Right 2</a>
<a href="#" class="hbtn hb-fill-bottom-rev-bg">Reveal Bottom 2</a>
<a href="#" class="hbtn hb-fill-left-rev-bg">Reveal Left 2</a>
<a href="#" class="hbtn hb-fill-middle-rev-bg">Reveal Middle</a>
<a href="#" class="hbtn hb-fill-middle2-rev-bg">Reveal Middle</a>

   

第三组:

<a href="#" class="hbtn hb-fill-top-br">Slide Up 3</a>
<a href="#" class="hbtn hb-fill-right-br">Slide Right 3</a>
<a href="#" class="hbtn hb-fill-bottom-br">Slide Down 3</a>
<a href="#" class="hbtn hb-fill-left-br">Slide Left 3</a>
<a href="#" class="hbtn hb-fill-middle-br">Slide Middle</a>
<a href="#" class="hbtn hb-fill-middle2-br">Slide Middle</a>
<a href="#" class="hbtn hb-fill-top-rev-br">Reveal Top 3</a>
<a href="#" class="hbtn hb-fill-right-rev-br">Reveal Right 3</a>
<a href="#" class="hbtn hb-fill-bottom-rev-br">Reveal Bottom 3</a>
<a href="#" class="hbtn hb-fill-left-rev-br">Reveal Left 3</a>
<a href="#" class="hbtn hb-fill-middle-rev-br">Reveal Middle</a>
<a href="#" class="hbtn hb-fill-middle2-rev-br">Reveal Middle</a>

   

第四组:

<a href="#" class="hbtn hb-fill-top-bg-br">Slide Up 4</a>
<a href="#" class="hbtn hb-fill-right-bg-br">Slide Right 4</a>
<a href="#" class="hbtn hb-fill-bottom-bg-br">Slide Down 4</a>
<a href="#" class="hbtn hb-fill-left-bg-br">Slide Left 4</a>
<a href="#" class="hbtn hb-fill-middle-bg-br">Slide Middle</a>
<a href="#" class="hbtn hb-fill-middle2-bg-br">Slide Middle</a>
<a href="#" class="hbtn hb-fill-top-rev-bg-br">Reveal Top 4</a>
<a href="#" class="hbtn hb-fill-right-rev-bg-br">Reveal Right 4</a>
<a href="#" class="hbtn hb-fill-bottom-rev-bg-br">Reveal Bottom 4</a>
<a href="#" class="hbtn hb-fill-left-rev-bg-br">Reveal Left 4</a>
<a href="#" class="hbtn hb-fill-middle-rev-bg-br">Reveal Middle</a>
<a href="#" class="hbtn hb-fill-middle2-rev-bg-br">Reveal Middle</a>

   

鼠标hover按钮边框过渡动画效果:

第一组:

<a href="#" class="hbtn hb-border-off">Border Fade</a>
<a href="#" class="hbtn hb-border-off2">Border Reverse</a>
<a href="#" class="hbtn hb-border-off3">Border Spin</a>
<a href="#" class="hbtn hb-border-top">Border Top</a>
<a href="#" class="hbtn hb-border-right">Border Right</a>
<a href="#" class="hbtn hb-border-bottom">Border Bottom</a>
<a href="#" class="hbtn hb-border-left">Border Left</a>

   

第二组:

<a href="#" class="hbtn hb-border-top2">Fade Top</a>
<a href="#" class="hbtn hb-border-right2">Fade Right</a>
<a href="#" class="hbtn hb-border-bottom2">Fade Bottom</a>
<a href="#" class="hbtn hb-border-left2">Fade Left</a>

   

第三组:

<a href="#" class="hbtn hb-border-top-br">Fade Top 2</a>
<a href="#" class="hbtn hb-border-right-br">Fade Right 2</a>
<a href="#" class="hbtn hb-border-bottom-br">Fade Bottom 2</a>
<a href="#" class="hbtn hb-border-left-br">Fade Left 2</a>

   

第四组:

<a href="#" class="hbtn hb-border-top-br2">Fade Top 3</a>
<a href="#" class="hbtn hb-border-right-br2">Fade Right 3</a>
<a href="#" class="hbtn hb-border-bottom-br2">Fade Bottom 3</a>
<a href="#" class="hbtn hb-border-left-br2">Fade Left 3</a>

   

第五组:

<a href="#" class="hbtn hb-border-top-br3">Detail Top</a>
<a href="#" class="hbtn hb-border-right-br3">Detail Right</a>
<a href="#" class="hbtn hb-border-bottom-br3">Detail Bottom</a>
<a href="#" class="hbtn hb-border-left-br3">Detail Left</a>

   

第六组:

<a href="#" class="hbtn hb-border-top-br4">Detail Top 2</a>
<a href="#" class="hbtn hb-border-right-br4">Detail Right 2</a>
<a href="#" class="hbtn hb-border-bottom-br4">Detail Bottom 2</a>
<a href="#" class="hbtn hb-border-left-br4">Detail Left 2</a>

   

本文由职坐标整理发布,更多相关内容,请关注职坐标WEB前端HTML5/CSS3频道!

本文由 @沉沙 发布于职坐标。未经许可,禁止转载。
喜欢 | 0 不喜欢 | 0
看完这篇文章有何感觉?已经有0人表态,0%的人喜欢 快给朋友分享吧~
评论(0)
后参与评论

您输入的评论内容中包含违禁敏感词

我知道了

助您圆梦职场 匹配合适岗位
验证码手机号,获得海同独家IT培训资料
选择就业方向:
人工智能物联网
大数据开发/分析
人工智能Python
Java全栈开发
WEB前端+H5

请输入正确的手机号码

请输入正确的验证码

获取验证码

您今天的短信下发次数太多了,明天再试试吧!

提交

我们会在第一时间安排职业规划师联系您!

您也可以联系我们的职业规划师咨询:

小职老师的微信号:z_zhizuobiao
小职老师的微信号:z_zhizuobiao

版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
 沪公网安备 31011502005948号    

©2015 www.zhizuobiao.com All Rights Reserved

208小时内训课程