先上效果图在上代码
需要图片,下面自取
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
input {
width: 335px;
height: 30px;
background: url(camera_01.png) no-repeat 300px center;
}
input:focus {
width: 335px;
height: 30px;
background: url(camera_02.png) no-repeat 300px center;
}
</style>
</head>
<body>
<input type="text">
</body>
</html>