html5中製作搜尋列的方法:首先新建一個div,id名為box,用來包裹搜尋框;然後在內部添加一個input標籤和一個div標籤;最後使用css為它們設計樣式即可。

本教學操作環境:windows7系統、html5版,DELL G3電腦,此方法適用於所有品牌電腦。
html5中製作搜尋列的方法:
1、先新建一個div,id名為box,用來包裹搜尋框;
# 2、然後在內部新增一個input標籤和一個div標籤,一個用來輸入文字,一個充當按鈕;
#3、最後使用css為它們設計樣式即可。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<style type="text/css">
#box{
width: 380px;
margin: 30px auto;
font-family: 'Microsoft YaHei';
font-size: 14px;
}
input{
width: 260px;
border: 1px solid #e2e2e2;
height: 30px;
float: left;
background-image: url(images/search.jpg);
background-repeat: no-repeat;
background-size: 25px;
background-position:5px center;
padding:0 0 0 40px;
}
#search{
width: 78px;
height: 32px;
float: right;
background: black;
color: white;
text-align: center;
line-height: 32px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="box">
<input type="search" name="search" placeholder="请输入关键字">
<div id="search">搜索</div>
</div>
</body>
</html>相關學習推薦:html教學
以上是html5中如何製作搜尋欄的詳細內容。更多資訊請關注PHP中文網其他相關文章!