随笔记录方便自己和同路人查阅,学习CSS时最好先学会HTML。

#------------------------------------------------我是可耻的分割线-------------------------------------------

<!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>

效果:

CSS基础(二十六)--Background背景之设置输入框,并把图片放到输入框内

 

相关文章:

  • 2021-08-27
  • 2021-10-19
  • 2021-11-14
  • 2021-10-14
  • 2021-12-19
  • 2021-12-06
  • 2021-10-07
  • 2021-08-14
猜你喜欢
  • 2021-12-16
  • 2021-11-10
  • 2021-10-08
  • 2021-10-14
  • 2021-12-15
  • 2021-12-16
  • 2021-10-21
相关资源
相似解决方案