CSS base (26) - Set Background backdrop of the input box, and put the picture into the input box

Essays and records to facilitate their access to fellow travelers, it is best to learn HTML learning CSS.

#------------------------------------------------I ------------------------------------------- dividing line is a shame

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div style="height:35px;width:400px;position:relative;">
        <input type="text" style="height:35px;width:370px;padding-right:30px;"/>
        <span style="position:absolute;right:6px;top:10px;background-image:url(4.png);height:16px;width:16px;
        display:inline-block;"></span>
    </div>
</body>
</html>

effect:

 

Guess you like

Origin www.cnblogs.com/lirongyang/p/11303835.html