小米输入框?

271 阅读1分钟
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>8.小米input框</title>
    <style>
        .clearfix:after{
            display: block;
            content: "";
            height: 0;
            font-size: 0;
            visibility: hidden;
            clear: both;
        }
        .clearfix{
            *zoom: 1;
        }
        .searchBox{
            width: 296px;
            border: 1px solid #ededed;
            margin: 100px auto;
            box-sizing: border-box;
        }
        .searchBox>div{
            height: 50px;
            float: left;
        }
        .searchLeft{
            width: 242px;
            border-right: 1px solid #ededed;
            box-sizing: border-box;
            position: relative;
        }
        .searchRight{
            width: 52px;
            background: hotpink;
        }
        input{
            width: 100%;
            height: 100%;
            border: none;
            padding: 10px;
            box-sizing: border-box;
        }
        .keyWords{
            height: 50px;
            line-height: 50px;
            position: absolute;
            left: 30px;
            top: 0;
        }
        .keyWords a{
            color: #666;
            padding: 0 5px;
            background: #eeeeee;
            margin-right: 5px;
            text-decoration: none;
        }
        .keyWords a:hover{
            background: hotpink;
            color: #ffffff;
        }
    </style>
</head>
<body>
<div class="searchBox clearfix">
    <div class="searchLeft">
        <input type="text">
        <div class="keyWords">
            <a href="javaScript:;">小米</a>
            <a href="javaScript:;">小米</a>
            <a href="javaScript:;">小米</a>
        </div>
    </div>
    <div class="searchRight"></div>
</div>
</body>
</html>