Place an image inside a text field

后端 未结 10 906
夕颜
夕颜 2021-02-04 04:15

I have an HTML input field like this. I would like to place an image inside the textbox on the right side. Can someone help me out with its CSS for that?



        
10条回答
  •  一生所求
    2021-02-04 04:37

    You need to add class like this:

    CSS:

    .bgInput {
      background: url(path of your image.jpg) top right no-repeat;
    }
    

    HTML:

    
    

提交回复
热议问题