HTML+CSS生成一个搜索表单
时间: 2023-05-30 13:01:20 浏览: 68
<!DOCTYPE html>
<html>
<head>
<title>搜索表单</title>
<style>
form {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 50px;
}
label {
font-size: 20px;
margin-bottom: 10px;
}
input[type="text"] {
width: 300px;
height: 30px;
padding: 5px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 5px;
margin-bottom: 20px;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form>
<label for="search">搜索:</label>
<input type="text" id="search" name="search">
<input type="submit" value="搜索">
</form>
</body>
</html>