css实现7种Material Design风格悬浮按钮点击弹出子菜单动画效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现7种Material Design风格悬浮按钮点击弹出子菜单动画效果代码
代码标签: css Material Design 风格 悬浮 按钮 点击 弹出 子菜单 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css">
<style>
*, *:after, *:before {
box-sizing: border-box;
}
body {
margin: 0;
background-color: #262626;
}
section {
background: #eceff1;
width: 100%;
padding: 50px;
min-height: 200px;
}
.btn-float {
width: 50px;
height: 50px;
line-height: 50px;
display: inline-block;
border: none;
font-size: 18px;
color: #fff;
text-align: center;
position: relative;
-webkit-transition: 0.3s;
transition: 0.3s;
border-radius: 50%;
cursor: pointer;
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.11);
}
.btn-float:hover {
text-decoration: none;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(0, 0, 0, 0.13);
}
.btn-float:active, .btn-float:focus {
outline: none;
}
.btn-float + .btn-float {
margin-left: 5px;
}
.yellow {
background: #ffa000;
}
.blue {
background: #40c4ff;
}
.green {
background: #00e676;
}
.purple {
background: #8e24aa;
}
.pink {
background: #e91e63;
}
.icon-bars {
background: #fff;
height: 1px;
width: 22px;
margin: auto;
display: block;
position: relative;
-moz-transition: 0.3s 0.3s;
-o-transition: 0.3s 0.3s;
-webkit-transition: 0.3s;
-webkit-transition-delay: 0.3s;
-webkit-transition: 0.3s 0.3s;
transition: 0.3s 0.3s;
}
.icon-bars:after {
content: '';
position: absolute;
height: 22px;
width: 1px;
background: #fff;
top: -10px;
}
.float-btn-group {
position: relative;
float: right;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.float-btn-group .btn-triger {
z-index: 15;
float: left;
}
.float-btn-group .btn-list {
position: absolute;
right: 0;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.float-btn-group .btn-list li {
display: inline-block;
}
.float-btn-group.open .icon-bars {
-ms-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.model-0 .float-btn-group {
width: 65px;
padding-left: 15px;
min-height: 65px;
overflow: hidden;
}
.model-0 .float-btn-group .btn-list {
opacity: 0;
width: 215px;
}
.model-0 .float-btn-group.open {
width: 285px;
}
.model-0 .float-btn-group.open .btn-list {
opacity: 1;
}
.model-1 {
background: #cfd8dc;
}
.model-1 .float-btn-group {
margin: auto;
float: none;
width: 50px;
}
.model-1 .float-btn-group .icon-bars {
-webkit-transition: 0.3s;
transition: 0.3s;
}
.model-1 .float-btn-group .btn-list {
background: rgba(0, 0, 0, 0.2);
width: 50px;
height: 50px;
overflow: hidden;
left: 0;
top: 0;
opacity: 0;
-moz-transition: 0.3s 0.3s;
-o-transition: 0.3s 0.3s;
-webkit-transition: 0.3s;
-webkit-transition-delay: 0.3s;
-webkit-transition: 0.3s 0.3s;
transition: 0.3s 0.3s;
border-radius: 50%;
}
.model-1 .float-btn-group .btn-list .btn-float {
position: absolute;
background: none;
box-shadow: none;
-ms-transform: scale(0, 0);
-webkit-transform: scale(0, 0);
transform: scale(0, 0);
margin: auto;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0