lyd447113735

 

  记一下简单实现一个功能:搜索框中放一个放大镜图片。

 

两种实现方式:

  • 一种是HTML自带的,将input控件的type属性改成search就行了。
  • 第二种是通过一个div盒子,使用相对定位实现,类似于帧布局,代码很短

 

<div style="display:inline-block;position: relative">

    <input type="text" style="width: 200px;height: 30px;" placeholder="搜索">

    <a style="position: absolute;right: 0px">

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2021-07-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-11-27
  • 2022-02-17
相关资源
相似解决方案