Place an image inside a text field

后端 未结 10 934
夕颜
夕颜 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:35

    You can add class to your input

    
    

    and then background image to class in css

    .inputImage
    {
    background:#FFFFFF url('img.jpg') no-repeat top right;
    }
    

提交回复
热议问题