button 添加立体阴影

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			button{
				background-color: rgb(20, 143, 224);
				border: none;
				color: white;
				padding: 9px 25px;
				text-align: center;
				text-decoration: none;
				display: inline-block;
				font-size: 12px;
				border-radius: 20px;
				margin: 10px 5px 30px 10px;
				cursor: pointer;
				
				background-image: linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,0.3) 100%);
				box-shadow: inset 0 0.3rem 0.2rem rgba(255,255,255,.2), inset 0 -0.3rem 0.2rem rgba(0,0,0,.2), 0 0.2rem 0.4rem rgba(0,0,0,.2);
				text-shadow: 0 0.05rem rgba(0,0,0,.8), 0 0.3rem 0.4rem rgba(0,0,0,.2), 0 -0.2rem 0.4rem rgba(255,255,255,.2);
			}
		</style>
	</head>
	<body>
		<button type="button">按钮1</button>
		<button type="button">按钮1</button>
		<button type="button">按钮1</button>
		<button type="button">按钮1</button>
		<button type="button">按钮1</button>
		<button type="button">按钮1</button>
		<button type="button">按钮1</button>
	</body>
</html>

  

posted @ 2020-12-31 18:21  三只小熊sky  阅读(536)  评论(0)    收藏  举报