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

จะเพิ่มมุมโค้งมนให้กับปุ่มด้วย CSS ได้อย่างไร?


หากต้องการเพิ่มมุมโค้งมนให้กับปุ่ม ให้ใช้คุณสมบัติ border-radius

ตัวอย่าง

คุณสามารถลองเรียกใช้รหัสต่อไปนี้เพื่อเพิ่มมุมโค้งมน -

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