使用 CSS 设置有边框的表单输入
若要为表单输入设置边框,请使用 CSS border 属性。
您可以尝试运行以下代码来添加边框
示例
<!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>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP