十八、百度输入框练习

代码:

<!DOCTYPE html>
<html>
<head>
    <title>百度输入区域</title>
    <meta charset="utf-8">

    <style type="text/css">
        .inputdiv{
            width: 700px;
            height: 40px;
            margin: 100px auto 0px auto;
            position: relative;
            left: 81px;

        }

        .inputdiv input{
            width: 400px;
            height: 36px;
            outline-style: none;
            border: 1px solid #ddd;
        }

        .inputdiv input:focus{
            border: 0px;
            outline-style: none;
            border: 1px solid #317ef3;
        }

        .inputdiv .toke{
            width: 40px;
            height: 40px;
            display: inline-block;
            background-image:url(imgs/recode.png) ;
            background-size: 25px 25px; 
            background-repeat: no-repeat;
            background-position: center center;
            position: relative;
            left: -81px;
            /*background: blue;*/
        }

        .inputdiv .toke:hover{
            width: 40px;
            height: 40px;
            background-image:url(imgs/recode_hover.png);
            background-size: 25px 25px;
            background-repeat: no-repeat;
            background-position: center center;

        }

        .inputdiv > *{
            float: left;
        }

        .inputdiv .scan{
            width: 40px;
            height: 40px;
            display: inline-block;
            background-image:url(imgs/camera.png) ;
            background-size: 25px 25px; 
            background-repeat: no-repeat;
            background-position: center center;
            position: relative;
            left: -81px;
        }


        .inputdiv .scan:hover{
            width: 40px;
            height: 40px;
            background-image:url(imgs/camera_hover.png);
            background-size: 25px 25px;
            background-repeat: no-repeat;
            background-position: center center;

        }

        .inputdiv .line{
            width: 1px;
            height: 20px;
            border-left: 1px solid #eee; 
            margin-top:10px;
            position: relative;
            left: -81px;
        }

        .inputdiv .search{
            width: 100px;
            height: 40px;
            background: #317ef3;
            text-decoration: none;
            text-align: center;
            line-height: 40px;
            color: white;
            position: relative;
            left: -82px;
            font-size: 14px;
        }
        .inputdiv .search:hover{
            background: #418ef3;
        }


    </style>

</head>
<body>

<div class="inputdiv">
    <div>
        <input type="text" name="content">
    </div>
    <span class="toke"></span>
    <span class="line"></span>
    <span class="scan"></span>
    <a class="search" href="#" >百度一下</a>
</div>
</body>
</html>

效果:

效果图

17级上课视频:
百度云视频:https://pan.baidu.com/s/1jHBLSay

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容