css实现中性Neumorphic各种形状带阴影示例代码

代码语言:html

所属分类:布局界面

代码描述:css实现中性Neumorphic各种形状带阴影示例代码

代码标签: css 中性 Neumorphic 各种 形状 阴影

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>

<head>
    <style>
        body{
    	margin: 0;
    	background: #d9d9d9;
    	padding: 0;
    	overflow: hidden;
    }
    .con{
    	display: flex;
    	margin:2% auto;
    	flex-direction: row;
    	justify-content: center;
    	align-items: center;
    
    }
    .shape1{
    	margin: 10px;
    	width: 200px;
    	height: 200px;
    	background: #d9d9d9;
    	border-radius: 20px;
    	box-shadow: -3px -3px 9px #ffffff83, 3px 3px 7px rgba(94,104,121,0.688);
    }
    .shape2{
    	margin: 10px;
    	width: 200px;
    	height: 200px;
    	background: #d9d9d9;
    	border-radius: 20px;
    	box-shadow:inset -3px -3px 9px #ffffff83,inset 3px 3px 7px rgba(94,104,121,0.688);
    }
    .shape3{
    	margin: 10px;
    	width: 200px;
    	height: 200px;
    	background: linear-gradient(145deg,#c3c3c3,#e8e8e8);
    	border-radius: 20px;
    	box-shadow:28px 28px 56px #ababab,-28px -28px 56px #ffffff;
    }
    .shape4{
    	margin: 10px;
    	width: 200px;
    	height: 200px;
    	background: linear-gradient(145deg,#e8e8e8,#c3c3c3);
    	border-radius: 20px;
    	box-shadow:28px 28px 56px #ababab,-28px -28px 56px #ffffff;
    }
    .shape11{
    	margin: 10px;
    	position: relative;
    	width: 200px;
    	height: 200px;
    	background: #d9d9d9;
    	border-radius: 20px;
    	justify-content: center;
    	align-items: center;
    	display: flex;
    	box-shadow: -3px -3px 9px #ffffff83, 3px 3px 7px rgba(94,104,121,0.688);
    }
    .shape11:after{
    	content: '';
    	position: absolute;
    	width: 90%;
    	height: 90%;
    	border-radius: 20px;
    	box-shadow:28px 28px 56px #ababab,-28px -28px 56px #ffffff;
    }
    .shape33{
    	margin: 10px;
    	width: 200px;
    	height: 200px;
    	b.........完整代码请登录后点击上方下载按钮下载查看

网友评论0