Doing a input type=“text” with CSS3 and fixed image on the background

前端 未结 3 1607
萌比男神i
萌比男神i 2021-01-14 13:02

I am developing my first HTML5 / CSS3 website and I want to do all I can correctly and with well methods and being usable too.

I have to reproduce the next search in

3条回答
  •  情歌与酒
    2021-01-14 13:30

    You should try :

    background-image : url(path/to/your/image/relative/to/css/file) no-repeat;
    background-position : right;
    

    You don't need

     
    

    You should also consider using a more specific CSS rule (to prevent styling other inputs)

    #header-search input[type="text"]
    

提交回复
热议问题