写一个搜索页面的html
时间: 2023-03-10 16:32:18 浏览: 59
我可以提供以下简单的HTML代码,以帮助你创建一个搜索页面:<html>
<head>
<title>搜索页面</title>
</head>
<body>
<form action="search.php" method="get">
<input type="text" name="q" />
<input type="submit" value="搜索" />
</form>
</body>
</html>
相关问题
给我写一个html搜索页面
A:
<!DOCTYPE html>
<html>
<head>
<title>搜索页面</title>
</head>
<body>
<h1>搜索页面</h1>
<form action="https://www.google.com/search" method="get">
<label for="search">搜索:</label>
<input type="text" id="search" name="q">
<button type="submit">搜索</button>
</form>
</body>
</html>
用css写一个搜索页面
好的,下面是一个简单的搜索页面的CSS样式示例:
```css
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.form {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
.form input[type="text"] {
font-size: 18px;
padding: 10px;
border: none;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
margin-bottom: 10px;
}
.form input[type="submit"] {
font-size: 18px;
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.form input[type="submit"]:hover {
background-color: #3e8e41;
}
.results {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.result {
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
padding: 10px;
margin-bottom: 10px;
width: 100%;
max-width: 500px;
}
.result h3 {
font-size: 20px;
margin-bottom: 5px;
}
.result p {
font-size: 16px;
margin-bottom: 10px;
}
```
这个样式包含了一个搜索表单和搜索结果的样式。你可以把这个样式与一个HTML搜索页面结合起来使用。