html隐藏汉堡按钮,HTML5 简单的汉堡包按钮动效 141005

编程入门 行业动态 更新时间:2024-10-09 10:23:47

html隐藏汉堡<a href=https://www.elefans.com/category/jswz/34/1771318.html style=按钮,HTML5 简单的汉堡包按钮动效 141005"/>

html隐藏汉堡按钮,HTML5 简单的汉堡包按钮动效 141005

CSS

语言:

CSSSCSS

确定

html {

background-color: #f4eeec; }

.tab {

position: fixed;

z-index: 1000;

top: 50%;

left: 50%;

width: 70px;

height: 70px;

margin-left: -35px;

margin-top: -35px;

border: 1px solid #e6e4e3;

cursor: pointer;

background-color: #fff; }

.tab .bars {

position: absolute;

top: 0;

left: 0;

width: 70px;

height: 100%;

border-right: 1px solid #e6e4e3; }

.tab .bars span {

position: absolute;

top: 50%;

left: 50%;

display: block;

width: 26px;

height: 3px;

margin-left: -13px;

margin-top: -1px;

background-color: #f15c28;

-webkit-transition: all 0.15s ease;

transition: all 0.15s ease; }

.tab .bars span:first-child {

margin-top: -7px; }

.tab .bars span:nth-child(2) {

-webkit-transition-delay: 0.075s;

transition-delay: 0.075s; }

.tab .bars span:last-child {

margin-top: 5px;

-webkit-transition-delay: 0.15s;

transition-delay: 0.15s; }

.tab:hover .bars span {

width: 30px;

margin-left: -15px; }

.tab.active .bars span {

width: 0;

margin-left: -15px; }

.tab.active .bars span:first-child {

margin-top: 0px;

width: 30px;

-webkit-transform: rotate(45deg);

-ms-transform: rotate(45deg);

transform: rotate(45deg); }

.tab.active .bars span:last-child {

margin-top: 0px;

width: 30px;

-webkit-transform: rotate(-45deg);

-ms-transform: rotate(-45deg);

transform: rotate(-45deg);

-webkit-transition-delay: 0.15s;

transition-delay: 0.15s; }

更多推荐

html隐藏汉堡按钮,HTML5 简单的汉堡包按钮动效 141005

本文发布于:2024-02-05 11:04:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1745309.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   汉堡包   简单   html

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!