实例代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
button{
padding:12px;
background-color:#4CAF50;
color:white;
border:none;
margin:4px 2px;
padding:16px 32px;
cursor:pointer; /*定义指针样式*/
}
button:hover{
background-color:green;
}
</style>
</head>
<body>
<h1>有样式的输入按钮</h1>
<button value="">按钮</button>
<button value="">重置</button>
<button value="">提交</button>
</body>
</html>
运行效果:
评论