用 CSS 來設定文字輸入框樣式


要設定表單的輸入域樣式,可以嘗試執行以下程式碼。設定 <input> 樣式

示例

即時演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         input {
            width: 100%;
         }
      </style>
   </head>
   <body>
      <p>Fill the below form,</p>
      <form>
         <label for = "subject">Subject</label>
         <input type = "text" id = "subject" name = "sub">
         <label for = "student">Student</label>
         <input type = "text" id = "student" name = "stu">
      </form>
   </body>
</html>

更新於:2020 年 6 月 23 日

282 次瀏覽

開啟您的職業生涯之旅

完成課程,獲得認證

入門
廣告