html中input标签放入小图标

直接上代码

<style type="text/css">
    *{
        margin: 0;
        padding: 0;
    }
    .box{
        width: 200px;
        position: relative;
    }
    .box .icon-search{
        width: 20px;
        height: 20px;
        position: absolute;
        top: 6px;
        right: 0;
    }
    .box .username{
        padding-left: 30px;
        height: 25px;
    }
</style>
</head>
<body>
<div class="box">
   
    <input type="text" class="username" />
    <i class="icon-search">图</i>
</div>
</body>


posted on 2020-05-15 17:49  三千世界a  阅读(1795)  评论(0编辑  收藏  举报

导航