HTML5, Placeholder, line-height in Webkit

后端 未结 4 785
小鲜肉
小鲜肉 2021-02-19 02:27

I have an input field:


with styles:

input {
    margin: 0;
    padding: 0         


        
4条回答
  •  终归单人心
    2021-02-19 02:58

    Looking at your tags, I'm assuming you are writing something like...

    
    

    Unfortunately, Chrome ties your hands when it comes to styling the placeholder, the selector looks like this...

    input::-webkit-input-placeholder {}
    

    You can find the styling options, gotchas and supported browsers in Styling the HTML Placeholder

提交回复
热议问题