CSS 버튼 색상
CSS 버튼 색상
버튼 색상
녹색 푸른 빨간 회색 검은
이 background-color속성을 사용하여 버튼의 배경색을 변경하십시오.
예
.button1 {background-color: #4CAF50;} /* Green */
.button2 {background-color: #008CBA;} /* Blue */
.button3 {background-color: #f44336;} /* Red */
.button4 {background-color: #e7e7e7; color: black;} /* Gray */
.button5 {background-color: #555555;} /* Black */
[전체소스]
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button2 {background-color: #008CBA;} /* Blue */
.button3 {background-color: #f44336;} /* Red */
.button4 {background-color: #e7e7e7; color: black;} /* Gray */
.button5 {background-color: #555555;} /* Black */
</style>
</head>
<body>
<h2>Button Colors</h2>
<p>Change the background color of a button with the background-color property:</p>
<button class="button">Green</button>
<button class="button button2">Blue</button>
<button class="button button3">Red</button>
<button class="button button4">Gray</button>
<button class="button button5">Black</button>
</body>
</html>
게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 1217 | 반응형 | 4년 전 | 3106 | ||
| 1216 | 웹접근성 | 4년 전 | 2503 | ||
| 1215 | CSS | 4년 전 | 4910 | ||
| 1214 | 기타 | 4년 전 | 8365 | ||
| 1213 | CSS | 4년 전 | 3256 | ||
| 1212 | 웹접근성 | 4년 전 | 3645 | ||
| 1211 | CSS |
|
5년 전 | 4122 | |
| 1210 | 기타 | 5년 전 | 3346 | ||
| 1209 | CSS | 5년 전 | 3595 | ||
| 1208 | 기타 | 5년 전 | 3155 | ||
| 1207 | 기타 | 5년 전 | 2894 | ||
| 1206 | CSS |
moviepd
|
5년 전 | 3723 | |
| 1205 | HTML |
moviepd
|
5년 전 | 4386 | |
| 1204 | 기타 | 6년 전 | 7838 | ||
| 1203 | 웹접근성 | 6년 전 | 3016 | ||
| 1202 | 기타 | 6년 전 | 2991 | ||
| 1201 | 기타 | 6년 전 | 4330 | ||
| 1200 | 기타 | 6년 전 | 4125 | ||
| 1199 | 기타 | 6년 전 | 4136 | ||
| 1198 | 기타 | 6년 전 | 2616 | ||
| 1197 | 기타 | 6년 전 | 2691 | ||
| 1196 | 기타 | 6년 전 | 2471 | ||
| 1195 | 기타 | 6년 전 | 2462 | ||
| 1194 | 기타 | 6년 전 | 3050 | ||
| 1193 | 기타 | 6년 전 | 9239 | ||
| 1192 | 기타 | 6년 전 | 3889 | ||
| 1191 | 기타 | 6년 전 | 6226 | ||
| 1190 | 기타 | 6년 전 | 2445 | ||
| 1189 | 기타 | 6년 전 | 2347 | ||
| 1188 | 기타 | 6년 전 | 1829 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기