好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

html5中如何制作搜索栏

ht ML 5中 制作 搜索栏的方法:首先新建一个div,id名为box,用来包裹搜索框;然后在内部添加一个 input标签 和一个div标签;最后使用css为它们设计样式即可。

本教程操作环境:windows7系统、html5版,DELL G3 电 脑,该方法适用于所有品牌电脑。

html5中制作搜索栏的方法:

1、首先新建一个div,id名为box,用来包裹搜索框;

2、然后在内部添加一个input标签和一个div标签,一个用来输入文字,一个充当按钮;

3、最后使用css为它们设计样式即可。

<!DOCTY PE  html>
<html>
<head>
< ;m eta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE= Edge ,ch rom e=1">
<t IT le>Ex am ples</title>
<meta name="description" content="">
<meta name="keywo rds " content="">
<link  hr ef="" rel="stylesheet">
<style type="text/css">
     # box{
        width: 380px;
        m arg in: 30px auto;
        font-f ami ly: 'Microsoft YaH ei ';
        font- Size:  14px;
    }
    input{
        width: 260px;
        border: 1px solid #e2e2e2;
        height: 30px;
        float: left;
        background -i mage: url(images/se Arch . 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中如何制作搜索栏的详细内容,更多请关注其它相关 文章 !

总结

以上是 为你收集整理的 html5中如何制作搜索栏 全部内容,希望文章能够帮你解决 html5中如何制作搜索栏 所遇到的问题。

如果觉得 网站内容还不错, 推荐好友。

查看更多关于html5中如何制作搜索栏的详细内容...

  阅读:17次