CSS3鼠标hover按钮过渡动画效果

来源:https://www.sucaihuo.com/js/2752.html 2017-08-16 23:59浏览(2767) 收藏

一款CSS3鼠标hover按钮过渡动画效果,分为颜色填充动画和边框变形动画两大类,可以通过最上面的一行按钮,来控制按钮的形状、图标、边框、间距及页面背景等,按钮的特效非常的丰富,可以让页面更加个性化。
CSS3鼠标hover按钮过渡动画效果
分类:css3 > 按钮 难易:初级
查看演示 下载资源 下载积分: 20 积分

页面的head部分,引入图标字体库等多个样式文件,代码如下:

<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link href="https://fonts.googleapis.com/css?family=Bellefair|Lato|Righteous" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="demo/css/core.css">

页面的body部分,用了多个a标签来作为按钮,代码如下:

<div class="container options">
		<h5>Options:</h5>
		<a href="#" class="hbtn hbtn-x hpill hb-fill-top-bg hsmall changeStyle">PILL</a>

		<a href="#" class="hbtn hbtn-x hb-fill-top-bg hsmall changeIcon"><i class="fa fa-star" aria-hidden="true"></i>ICONS</a>

		<a href="#" class="hbtn hbtn-x hb-fill-top-bg hsmall changeBackground">BACKGROUND</a>

		<a href="#" class="hbtn hbtn-x hb-fill-top-bg hsmall changeBorder">BORDER</a>

		<a href="#" class="hbtn hbtn-x hb-fill-top-bg hsmall changePadding">PADDING</a>

		<!--<a href="#" class="hbtn hbtn-x hb-fill-top-bg hsmall changeColor">Color</a>-->

	</div>

	<div class="container">
		<h4>Fill Transitions</h4>
	</div>

	<div class="container">
		<h5>Set 1</h5>
		<p class="lead">Simple reveal/hide animation</p>
		<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>

		<br>

		<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>
	</div>

页面的底部,需引入jQuery库和功能插件,代码如下:

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="demo/js/functions.js"></script>
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2