html登陆切换效果,切换效果1.html

Document

@import url("https://fonts.googleapis.com/css?family=Signika");

*,

::before,

::after {

box-sizing: border-box;

}

body {

margin: 0;

height: 100vh;

overflow: hidden;

display: flex;

line-height: 1.5;

font-family: 'Signika', cursive;

font-weight: 300;

background-color: #21213d;

color: #fff;

}

a {

text-decoration: none;

color: #3369e7;

}

#check {

display: none;

}

#check+label {

position: absolute;

top: 1em;

left: 1em;

z-index: 1;

display: flex;

align-items: center;

cursor: pointer;

}

#check+label::before {

position: absolute;

content: '';

top: -1em;

left: -1em;

width: 100vw;

height: 100vh;

background-color: rgba(33, 33, 61, 0.5);

transform-origin: 50% 50%;

transform: scale(1.3);

visibility: hidden;

opacity: 0;

transition: all 250ms linear;

}

#check+label svg {

margin-right: 0.5em;

}

#check+label svg path {

transform-origin: 35% 50%;

transition: transform 166.6666666667ms cubic-bezier(0.06, 0.63, 0.91, 0.66);

}

#check:checked+label~aside {

transform: none;

}

#check:checked+label::before {

left: calc(25vw - 1em);

transform: scale(1);

visibility: visible;

opacity: 1;

}

@media (max-width: 576px) {

#check:checked+label::before {

left: calc(50vw - 1em);

}

}

#check:checked+label svg #one {

transform: rotate(45deg);

}

#check:checked+label svg #two {

transform: rotate(-45deg);

}

#check:checked+label~article {

z-index: -1;

transform: translateX(25vw) scale(0.7);

border-radius: 0.25em;

user-select: none;

pointer-events: none;

}

aside,

article {

padding: 2.5em 1em 0.25em;

transition: all 250ms cubic-bezier(0.06, 0.63, 0.91, 0.66);

}

aside {

position: absolute;

width: 25vw;

height: 100%;

display: flex;

flex-direction: column;

justify-content: space-between;

background-image: linear-gradient(45deg, #3369e7, #2ede98);

transform: translateX(-100%);

}

@media (max-width: 576px) {

aside {

width: 50vw;

}

}

article {

position: relative;

transform-origin: 10% 50%;

width: 100%;

background-image: linear-gradient(45deg, #1cc7d0, #2ede98);

}

article .wrapper {

margin: auto;

padding: 2em;

max-width: 90%;

height: 100%;

display: flex;

flex-direction: column;

justify-content: space-between;

}

article .wrapper h1 {

margin: 0;

}

article .wrapper .footer {

text-align: right;

}

Click me

Title

  • Nav text
  • Nav text
  • Nav text
  • Nav text
  • Nav text

© 2019 by Andrej Sharapov

Off-Canvas menu on Pure CSS

Lorem ipsum dolor sit amet consectetur adipisicing elit. Provident rerum unde porro consequatur

doloribus ex distinctio similique, voluptas repellendus voluptates nam dolorum! Repudiandae maxime,

itaque vero dolorem distinctio inventore explicabo!

Odio eaque cum blanditiis esse, earum saepe voluptate quae aliquid possimus facere non qui illo

necessitatibus eveniet ab sit quaerat. Atque animi nulla veritatis molestiae qui ipsam ut assumenda

facilis?

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值