用 CSS 做一个美化的 button 按钮

效果图:

<head>
<meta charset="utf-8">
<title>无标题文档</title>
	<style>
		button{
			 200px;/*设置按钮宽度*/
			height: 30px;/*设置按钮高度*/
			color:white;/*字体颜色*/
			background-color:cornflowerblue;/*按钮背景颜色*/
			border-radius: 3px;/*让按钮变得圆滑一点*/
			border- 0;/*消去按钮丑的边框*/
			margin: 0;
			outline: none;/*取消轮廓*/
			font-family: KaiTi;/*字体设置为楷体*/
			font-size: 17px;/*设置字体大小*/
			text-align: center;/*字体居中*/
			cursor: pointer;/*设置鼠标箭头手势*/
		}
		button:hover{/*鼠标移动时的颜色变化*/
			background-color: antiquewhite;
		}
	</style>
</head>

<body>
	<button>确认</button>
</body>
原文地址:https://www.cnblogs.com/Romantic-Chopin/p/12451082.html