css实现菜单切换动画效果

代码语言:html

所属分类:表单美化

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<title> Menu button and horizontal ellipsis transformation animation</title>
<style>
      *
{
    outline: transparent;
    -webkit-tap-highlight-color: transparent;
}

html, body
{
    height: 100%;
}

body
{
    margin: 0;
}

#menu_checkbox
{
    display: none;
}

label
{
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    margin: 0 auto;
    margin-top: -46px;
    display: block;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    transition: 0.3s ease transform;
    cursor: pointer;
}

label div
{
    width: 6px;
    height: 6px;
    background-color: #143240;
    margin-left: 0;
    margin-bottom: 6px;
    border-radius: 4px;
    transition: 0.3s ease width, 0.3s ease margin-left, 0.3s ease margin-bottom, 0.3s ease background-color;
}

label div:first-child
{
    width: 22px;
}

label div:nth-child(2)
{
    width: 15px;
}

label div:last-child
{
    width: 30px;
    margin-bottom: 0;
}

#menu_checkb.........完整代码请登录后点击上方下载按钮下载查看

网友评论0