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>