使用 CSS 設定 input type reset 樣式
input type 按鈕可以是提交按鈕或重置按鈕。使用 CSS,我們可以設定網頁上任何按鈕的樣式。
你可以嘗試執行以下程式碼為 input type 按鈕設定樣式
示例
<!DOCTYPE html>
<html>
<head>
<style>
input[type = submit], input[type = reset] {
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 = "reset" value = "Reset">
<input type = "submit" value = "Submit">
</form>
</body>
</html>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP