svg噪点图案生成器效果代码
代码语言:html
所属分类:其他
代码描述:svg噪点图案生成器效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--gray-dark: hsl(0, 0%, 8%);
--gray-med: hsl(0, 0%, 88%);
--gray-light: hsl(0, 0%, 97%);
}
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
padding: 1rem;
font-family: "Poppins", sans-serif;
color: var(--gray-dark);
line-height: 1;
}
.stack {
--space: 1.5rem;
}
.stack > * + * {
margin-top: var(--space);
}
.generator {
position: relative;
z-index: 1;
width: 100%;
max-width: 28rem;
background: #fff;
padding: 1rem;
border-radius: 1.5rem;
box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.006), 0 6.7px 5.3px rgba(0, 0, 0, 0.008), 0 12.5px 10px rgba(0, 0, 0, 0.01), 0 22.3px 17.9px rgba(0, 0, 0, 0.012), 0 41.8px 33.4px rgba(0, 0, 0, 0.014), 0 100px 80px rgba(0, 0, 0, 0.02);
}
.generator__canvas {
margin-bottom: 2rem;
}
.generator__control {
display: grid;
grid-template-columns: 112px 1fr;
align-items: center;
height: 3rem;
}
.generator__control-label {
font-weight: 600;
}
.generator__control--switch .switch-btn {
--height: 3rem;
position: relative;
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
width: 100%;
height: var(--height);
margin: 0 auto;
border-radius: calc(var(--height) / 2);
border: 0;
background: var(--gray-light);
}
.generator__control--switch .switch-btn > * {
pointer-events: none;
}
.generator__control--switch .switch-btn__label {
position: relative;
height: 100%;
}
.generator__control--switch .switch-btn__marker {
position: absolute;
width: calc(50% - 0.25rem);
height: calc(100% - 0.5rem);
background: white;
left: 0.25rem;
border-radius: calc(var(--height) / 2);
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.05);
transition: transform 200ms ease-in-out;
}
.generator__c.........完整代码请登录后点击上方下载按钮下载查看
网友评论0