Computer >> Máy Tính >  >> Lập trình >> CSS

Nút kiểu nhập kiểu với CSS

Nút loại đầu vào có thể là nút gửi hoặc nút đặt lại. Với CSS, chúng ta có thể tạo kiểu cho bất kỳ nút nào trên trang web.

Bạn có thể thử chạy mã sau để tạo kiểu cho nút nhập kiểu:

Ví dụ

<!DOCTYPE html>
<html>
   <head>
      <style>
         input[type=button] {
            background-color: orange;
            border: none;
            text-decoration: none;
            color: white;
            padding: 20px 20px;
            margin: 20px 20px;
            cursor: pointer;
         }
      </style>
   </head>
   <body>
      <p>Fill the below form,</p>
      <form>
         <label for = "subject">Subject</label>
         <input type = "text" id = "subject" name = "sub"><br><br>
         <label for = "student">Student</label>
         <input type = "text" id = "student" name = "stu"><br>
         <input type = "button" value = "Button">
      </form>
   </body>
</html>