div+css实现逼真立体交互按钮效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现逼真立体交互按钮效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
html, body {
height: 100%;
}
body {
display: flex;
justify-content: center;
background: rgb(194 206 219);
background: linear-gradient(205deg, rgb(194 206 219) 0%, rgb(37 44 55) 100%);
margin: 0;
}
.footer {
position: absolute;
bottom: 0;
right: 0;
font-family: monospace;
color: #aaa;
padding: 10px;
font-size: 12px;
}
#noise-svg {
height: 100%;
width: 100%;
opacity: 0.1;
}
#noise-rect {
width: 100vw;
height: 100vh;
}
.out-container {
--object-size: min(333px, 90vh);
border-radius: calc(var(--object-size) / 6);
box-shadow:
10px -10px 20px 7px rgba(153, 153, 153, 0.2),
-7px 20px 10px rgba(0, 0, 0, 1),
4px -4px 8px 4px rgba(154, 159, 167, 0.3),
-10px 30px 20px rgba(0, 0, 0, 1),
inset -20px 20px 10px -12px rgba(206, 222, 236, 0.95),
inset 0px 0px 10px 10px rgba(0, 0, 0, 0.8),
-30px 80px 50px rgba(0, 0, 0, 0.8);
}
.out-container,
.out-container *{
background: linear-gradient(205deg, rgb(214 230 244) 0%, rgb(77 91 106) 100%);
height: calc( var(--object-size) * 1.07);
width: var(--object-size);
position: absolute;
margin: auto;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0