搜索框制作

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!--防止IE浏览器进入怪异文档模式,兼容性视图-->
    <!--content="IE=edge",意思为文档模式用最新版本IE文档模式进行渲染。-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>bing search</title>
    <style type="text/css">
        body {
            background-color: #333;
        }

        .bg-div {
            background-image: url(river.jpg);
            width: 1228px;
            height: 690px;
            /*图片居中*/
            margin: 0 auto;
        }

        .logo {
            background-image: url(logo.png);
            width: 107px;
            height: 53px;
            float: left;
            margin: -6px 18px 0 0;
        }

        form {
            float: left;
            background-color: #fff;
            padding: 5px;

        }

        .search-input-text {
            border: 0;
            float: left;
            height: 25px;
            line-height: 25px;
            outline: none;
            width: 350px;
        }

        .search-input-submit {
            border: 0;
            background-image: url(search-button.png);
            width: 29px;
            height: 29px;
            float: left;
        }

        .search-box {
            position: relative;
            top: 160px;
            left: 300px;
        }
    </style>
</head>
<body>
<!--bg-div 设置背景图片-->
<!--search-box 使form表单绝对定位-->
<!--logo和form均float:left使两者对齐-->
<!--search-input-text与search-input-text均float:left使两者对齐-->
<!--value="" 去除type="submit"的默认提交样式-->
<!--outline:none;去掉输入框输入时的高亮状态-->
<!--border:0;去掉搜索框原有的灰色边框-->
<!--height:25px; line-height:25px   使输入框居中-->
<div class="bg-div">
    <div class="search-box">
        <div class="logo"></div>
        <form action="">
            <input type="text" class="search-input-text">
            <input type="submit" class="search-input-text" value="">
        </form>
    </div>
</div>
</body>
</html>

  

转载于:https://www.cnblogs.com/qwert1/p/7103053.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值