<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS按钮悬停动画</title>
<style>
body{background:#000;}
button{cursor:pointer;}
/* Reset */
.animate, .btn, .btn-border-o:before, .btn-border-o:after, .btn-border:before, .btn-border:after, .btn-border-rev-o:before, .btn-border-rev-o:after, .btn-border-rev:before, .btn-border-rev:after, .btn-fill-vert-o:before, .btn-fill-vert-o:after, .btn-fill-vert:before, .btn-fill-vert:after, .btn-fill-horz-o:before, .btn-fill-horz-o:after, .btn-fill-horz:before, .btn-fill-horz:after {
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
/* Main Styles */
.main-container {
width: 100%;
max-width: 750px;
margin: 0 auto;
padding: 0 15px;
}
h1 {
line-height: 1;
padding: 25px 0;
border-bottom: 1px solid #2c3e50;
font-size: 35px;
color: #2c3e50;
text-align: center;
}
section {
padding: 60px 0 61px;
text-align: center;
position: relative;
}
section h2 {
margin-bottom: 15px;
font-weight: normal;
font-size: 17px;
color: #D2D2D2;
text-align: center;
}
section:not(:last-child):after {
content: '';
width: 70%;
height: 1px;
border-bottom: 1px dashed #2c3e50;
opacity: .5;
position: absolute;
bottom: -1px;
left: 15%;
}
.btn {
display: inline-block;
line-height: 35px;
margin: 8px;
padding: 0 15px;
font-size: 15px;
position: relative;
opacity: .999;
border-radius: 3px;
}
.btn-border-o {
background-color: transparent;
border: 1px solid #d0d0d0;
color: #B8B8B8;
}
.btn-border-o:before, .btn-border-o:after {
content: '';
border-style: solid;
position: absolute;
z-index: 5;
border-radius: 3px;
box-sizing: content-box;
}
.btn-border-o:before {
width: 0;
height: 100%;
border-width: 1px 0 1px 0;
top: -1px;
left: 0;
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.btn-border-o:after {
width: 100%;
height: 0;
border-width: 0 1px 0 1px;
top: 0;
left: -1px;
}
.btn-border-o:hover:before {
width: 100%;
}
.btn-border-o:hover:after {
height: 100%;
}
.btn-border-o.btn-green:before, .btn-border-o.btn-green:after {
border-color: #2ecc71;
}
.btn-border-o.btn-green:hover {
color: #2ecc71;
}
.btn-border-o.btn-blue:before, .btn-border-o.btn-blue:after {
border-color: #3498db;
}
.btn-border-o.btn-blue:hover {
color: #3498db;
}
.btn-border-o.btn-purple:before, .btn-border-o.btn-purple:after {
border-color: #9b59b6;
}
.btn-border-o.btn-purple:hover {
color: #9b59b6;
}
.btn-border-o.btn-navy:before, .btn-border-o.btn-navy:after {
border-color: #34495e;
}
.btn-border-o.btn-navy:hover {
color: #34495e;
}
.btn-border-o.btn-orange:before, .btn-border-o.btn-orange:after {
border-color: #e67e22;
}
.btn-border-o.btn-orange:hover {
color: #e67e22;
}
.btn-border-o.btn-red:before, .btn-border-o.btn-red:after {
border-color: #e74c3c;
}
.btn-border-o.btn-red:hover {
color: #e74c3c;
}
.btn-border {
background-color: #e5e5e5;
border: 1px solid #e5e5e5;
color: #a6a6a6;
}
.btn-border:before, .btn-border:after {
content: '';
border-style: solid;
position: absolute;
z-index: 5;
border-radius: 3px;
box-sizing: content-box;
}
.btn-border:before {
width: 0;
height: 100%;
border-width: 1px 0 1px 0;
top: -1px;
left: 0;
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.btn-border:after {
width: 100%;
height: 0;
border-width: 0 1px 0 1px;
top: 0;
left: -1px;
}
.btn-border:hover {
background-color: transparent;
}
.btn-border:hover:before {
width: 100%;
}
.btn-border:hover:after {
height: 100%;
}
.btn-border.btn-green:before, .btn-border.btn-green:after {
border-color: #2ecc71;
}
.btn-border.btn-green:hover {
color: #2ecc71;
}
.btn-border.btn-blue:before, .btn-border.btn-blue:after {
border-color: #3498db;
}
.btn-border.btn-blue:hover {
color: #3498db;
}
.btn-border.btn-purple:before, .btn-border.btn-purple:after {
border-color: #9b59b6;
}
.btn-border.btn-purple:hover {
color: #9b59b6;
}
.btn-border.btn-navy:before, .btn-border.btn-navy:after {
border-color: #34495e;
}
.btn-border.btn-navy:hover {
color: #34495e;
}
.btn-border.btn-orange:before, .btn-border.btn-orange:after {
border-color: #e67e22;
}
.btn-border.btn-orange:hover {
color: #e67e22;
}
.btn-border.btn-red:before, .btn-border.btn-red:after {
border-color: #e74c3c;
}
.btn-border.btn-red:hover {
color: #e74c3c;
}
.btn-border-rev-o {
background-color: transparent;
border: 1px solid #d0d0d0;
color: #B8B8B8;
}
.btn-border-rev-o:before, .btn-border-rev-o:after {
content: '';
border-style: solid;
position: absolute;
z-index: 5;
border-radius: 3px;
box-sizing: content-box;
}
.btn-border-rev-o:before {
width: 0;
height: 100%;
border-width: 1px 0 1px 0;
top: -1px;
right: 0;
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.btn-border-rev-o:after {
width: 100%;
height: 0;
border-width: 0 1px 0 1px;
bottom: 0;
left: -1px;
}
.btn-border-rev-o:hover:before {
width: 100%;
}
.btn-border-rev-o:hover:after {
height: 100%;
}
.btn-border-rev-o.btn-green:before, .btn-border-rev-o.btn-green:after {
border-color: #2ecc71;
}
.btn-border-rev-o.btn-green:hover {
color: #2ecc71;
}
.btn-border-rev-o.btn-blue:before, .btn-border-rev-o.btn-blue:after {
border-color: #3498db;
}
.btn-border-rev-o.btn-blue:hover {
color: #3498db;
}
.btn-border-rev-o.btn-purple:before, .btn-border-rev-o.btn-purple:after {
border-color: #9b59b6;
}
.btn-border-rev-o.btn-purple:hover {
color: #9b59b6;
}
.btn-border-rev-o.btn-navy:before, .btn-border-rev-o.btn-navy:after {
border-color: #34495e;
}
.btn-border-rev-o.btn-navy:hover {
color: #34495e;
}
.btn-border-rev-o.btn-orange:before, .btn-border-rev-o.btn-orange:after {
border-color: #e67e22;
}
.btn-border-rev-o.btn-orange:hover {
color: #e67e22;
}
.btn-border-rev-o.btn-red:before, .btn-border-rev-o.btn-red:after {
border-color: #e74c3c;
}
.btn-border-rev-o.btn-red:hover {
color: #e74c3c;
}
.btn-border-rev {
background-color: #e5e5e5;
border: 1px solid #e5e5e5;
color: #a6a6a6;
}
.btn-border-rev:before, .btn-border-rev:after {
content: '';
border-style: solid;
position: absolute;
z-index: 5;
border-radius: 3px;
box-sizing: content-box;
}
.btn-border-rev:before {
width: 0;
height: 100%;
border-width: 1px 0 1px 0;
top: -1px;
right: 0;
}
.btn-border-rev:after {
width: 100%;
height: 0;
border-width: 0 1px 0 1px;
bottom: 0;
left: -1px;
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
}
.btn-border-rev:hover {
background-color: transparent;
}
.btn-border-rev:hover:before {
width: 100%;
}
.btn-border-rev:hover:after {
height: 100%;
}
.btn-border-rev.btn-green:before, .btn-border-rev.btn-green:after {
border-color: #2ecc71;
}
.btn-border-rev.btn-green:hover {
color: #2ecc71;
}
.btn-border-rev.btn-blue:before, .btn-border-rev.btn-blue:after {
border-color: #3498db;
}
.btn-border-rev.btn-blue:hover {
color: #3498db;
}
.btn-border-rev.btn-purple:before, .btn-border-rev.btn-purple:after {
border-color: #9b59b6;
}
.btn-border-rev.btn-purple:hover {
color: #9b59b6;
}
.btn-border-rev.btn-navy:before, .btn-border-rev.btn-navy:after {
border-color: #34495e;
}
.btn-border-rev.btn-navy:hover {
color: #34495e;
}
.btn-border-rev.btn-orange:before, .btn-border-rev.btn-orange:after {
border-color: #e67e22;
}
.btn-border-rev.btn-orange:hover {
color: #e67e22;
}
.btn-border-rev.btn-red:before, .btn-border-rev.btn-red:after {
border-color: #e74c3c;
}
.btn-border-rev.btn-red:hover {
color: #e74c3c;
}
.btn-fill-vert-o {
background-color: transp
CSS3按钮鼠标悬停边框动画特效.zip
版权申诉
199 浏览量
2022-11-16
21:21:34
上传
评论
收藏 21KB ZIP 举报
芝麻粒儿
- 粉丝: 5w+
- 资源: 2万+
最新资源
- pta题库答案c语言之复杂度1最大子列和问题.zip
- 三维装箱问题(Three-Dimensional Bin Packing Problem,3D-BPP)是一个经典的组合优化问题
- 以下是一些关于Linux线程同步的基本概念和方法.txt
- 以下是一个简化的示例,它使用pygame库来模拟烟花动画的框架.txt
- Linux线程同步机制深度解析与实用指南.zip
- PTA题库C语言解题策略与实战.rar
- SVPWM控制技术的simulink建模与仿真【包括simulink模型,参考文献,操作步骤】
- AI高清修复图片画质易语言易语言源码易语言填表
- 映射窗口.ec易语言易语言模块CPU占用0%游戏监控窗口监控
- 易语言 361窗口模块高效、便捷、自封装、自用
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈