css+svg实现磨砂透明层渐变弹出动画效果代码
代码语言:html
所属分类:弹出层
代码描述:css+svg实现磨砂透明层渐变弹出动画效果代码
代码标签: css svg 磨砂 透明 层 渐变 弹出 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background: #161616;
}
* {
margin: 0;
padding: 0;
-ms-overflow-style: none;
scrollbar-width: none;
text-rendering: geometricPrecision;
box-sizing: border-box;
}
*::-webkit-scrollbar {
display: none;
}
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&display=swap');
:root {
--side-panel: 200px;
}
h1, p {
font-family: "Hanken Grotesk", sans-serif;
font-optical-sizing: auto;
font-style: normal;
color: #fff;
}
h1 {
font-size: 40px;
font-weight: 400;
letter-spacing: -0.05em;
}
p {
font-size: 16px;
letter-spacing: 0em;
line-height: 140%;
}
p.bold {
font-weight: 400;
color: rgba(255,255,255,0.65);
}
p.light {
font-weight: 400;
color: rgba(255,255,255,0.45);
}
main {
position: relative;
width: 100%;
height: 100vh;
padding: 32px;
display: flex;
align-items: stretch;
overflow: hidden;
}
.content-wrapper {
display: flex;
align-items: center;
justify-content: center;
flex: 1 1 0%;
}
.content {
position: relative;
width: 100%;
max-width: 800px;
height: 100%;
min-height: 500px;
background: #161616;
box-shadow: inset 0 0 150px rgba(52,46,45,1);
display: flex;
align-items: start;
justify-content: start;
gap: 16px;
transform: translate3d(0,0,0);
border-radius: 50px;
border: 2px solid #232120;
-webkit-border-radius: 50px;
will-change: box-shadow;
-webkit-will-change: box-shadow;
transition: 1s cubic-bezier(.17,1,.33,1);
}
.content.active {
box-shadow: inset 0 0 150px rgba(52,46,45,0.7);
background: #0F0F0F;
}
.main-content {
position: relative;
width: 100%;
height: 100%;
border-radius: 48px;
-webkit-border-radius: 48px;
overflow: hidden;
transform: translate3d(0,0,0) scale(1);
filter: blur(0px) brightness(1);
will-change: transform, filter;
-webkit-will-change: transform, filter;
transition: 0.6s cubic-bezier(.17,1,.33,1);
}
.content.active .main-content {
transform: translate3d(0,0,0) scale(0.9);
filter: blur(16px) brightness(0.7);
transition: 0.3s ease-out;
}
.photo-wrapper {
position: relative;
height: 50%;
width: 100%;
max-height: 400px;
}
.photo {
position: absolute;
z-index: 1;
top:.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0