いい感じのボタンのCSSの例

例1

ボタンは、クラス名:hoverでホバーしたときのスタイルを変更できる。

.custom-button { 
	padding: 10px 20px; 
	font-size: 16px; 
	font-weight: bold; 
	text-align: center; 
	text-decoration: none; 
	color: #fff; 
	background-color: #3498db; 
	border: none; 
	border-radius: 5px; 
	cursor: pointer; 
	transition: background-color 0.3s; 
} 
 
.custom-button:hover { 
  background-color: #2980b9; 
}