使用CSS设置带边框的表单输入
要将边框设置为表单输入,请使用CSSborder属性。
您可以尝试运行以下代码来添加边框
示例
<!DOCTYPE html> <html> <head> <style> input[type = text] { width: 100%; padding: 10px 15px; margin: 5px 0; box-sizing: border-box; border: 3px inset orange; } </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>