html5中如何制作搜索栏


当前第2页 返回上一页

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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

<!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中如何制作搜索栏的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

一个完整的html对象是什么样的,如何生成?

HTML5编程实战之三-图片文本(txt)拖拽预览实现代码

怎么学HTML5

HTML5上传视频无法播放以及兼容的解决方法(图)

HTML5 canvas粒子形成下雪背景的效果

canvas如何实现二维码和图片合成的代码

详细介绍通过HTML5的drag和drop生成拓扑图片base64信息的案例

HTML5 audio标签怎么用?HTML5 自动播放实现代码实例

recorder.js 基于 HTML5 实现录音功能

http协议发展过程一览

更多相关阅读请进入《HTML5》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...