python(html 输入框加入用户图标)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <div style="height: 35px;width: 400px;position: relative;">
            <!--<div的width为400px..输入抠的width为370有效输入范围+30的边界>-->
        <input type="text" style="height: 35px;width: 370px;padding-right: 30px" />
        <span style="position:absolute;right:0;top:10px;background-image: url(http://img2.imgtn.bdimg.com/it/u=3225374393,3481129027&fm=27&gp=0.jpg);height: 16px;width: 16px;display: inline-block;"></span>
    </div>
</body>
</html>

发表评论