使用 CSS 設定 `
輸入型別按鈕可以是提交按鈕或重置按鈕。使用 CSS,我們可以對網頁上的任何按鈕設定樣式。
可以嘗試執行以下程式碼為輸入型別按鈕設定樣式
示例
<!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>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言
C++
C#
MongoDB
MySQL
JavaScript
PHP