css模拟全屏手机弹出菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:css模拟全屏手机弹出菜单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
align-items: center;
background-color: #569bd7;
display: flex;
font-family: "Inter", serif;
font-size: 14px;
justify-content: center;
overflow: hidden;
height: 100vh;
margin: 0;
user-select: none;
}
.phone-frame {
background-color: #353535;
border-radius: 30px;
box-shadow: 0 0.4px 1px rgba(0, 0, 0, 0.026), 0 1px 2.3px rgba(0, 0, 0, 0.045),
0 1.9px 4.4px rgba(0, 0, 0, 0.065), 0 3.4px 7.8px rgba(0, 0, 0, 0.094),
0 6.3px 14.6px rgba(0, 0, 0, 0.145), 0 15px 35px rgba(0, 0, 0, 0.25);
width: 240px;
height: 480px;
padding: 5px;
}
.phone-screen {
align-items: center;
background-color: #000;
border-radius: 26px;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
perspective: 460px;
position: relative;
width: 100%;
}
.imageContainer {
overflow: hidden;
transform-origin: 100% 0;
transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
width: 100%;
}
.active .imageContainer {
transform: rotateX(-45deg);
}
.image {
left: -76%;
position: relative;
width: 250%;
}
.overlay {
background: linear-gradient(#0000001f 0%, #0000009f 80%, #000000bf 100%);
height: 100%;
opacity: 0;
position: absolute;
transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
top: 0;
width: 100%;
}
.active .overlay {
opacity: 1;
}
.button-menu {
border-radius: 50%;
position: .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0