Computer >> 컴퓨터 >  >> 프로그램 작성 >> CSS

CSS를 사용하여 버튼에 색상 테두리를 추가하는 방법은 무엇입니까?

<시간/>

색상 테두리를 추가하려면 CSS 테두리 속성을 사용하세요.

예시

다음 코드를 실행하여 색상 테두리를 추가할 수 있습니다.

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