Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

เปลี่ยนสีพื้นหลังปุ่มด้วย CSS

หากต้องการเปลี่ยนสีพื้นหลังของปุ่ม ให้ใช้คุณสมบัติ background-color

ตัวอย่าง

<!DOCTYPE html> <html>    <head>       <style>          .btn {             background-color: yellow;             color: black;             text-align: center;             font-size: 13px;          }       </style>    </head>    <body>       <h2>Result</h2>       <p>Click below for result:</p>       <button class = "btn">Result</button>    </body> </html>