change placeholder text color of textarea

前端 未结 4 2044
眼角桃花
眼角桃花 2020-12-15 17:30

I know there is this post on changing the placeholder text. I\'ve tried implementing in on my textarea tags

textarea::-webkit-input-placeholder {
color: #fff         


        
相关标签:
4条回答
  • 2020-12-15 17:55

    Wrap in quotes:

    onchange="{(e) => this.props.handleUpdateQuestion(e, firstQuestion.Id)}"
    

    otherwise, it should work just fine:

    textarea::-webkit-input-placeholder {
      color: #0bf;
    }
    
    textarea:-moz-placeholder { /* Firefox 18- */
      color: #0bf;  
    }
    
    textarea::-moz-placeholder {  /* Firefox 19+ */
      color: #0bf;  
    }
    
    textarea:-ms-input-placeholder {
      color: #0bf;  
    }
    
    textarea::placeholder {
      color: #0bf;  
    }
    <textarea placeholder="test"></textarea>

    0 讨论(0)
  • 2020-12-15 17:59

    I am not sure but I think is not necessary to use the prefixes right now.

    textarea::placeholder {
      color: #fff;  
    }
    
    0 讨论(0)
  • 2020-12-15 18:00
    ::-webkit-input-placeholder {
           color: orange;
        }
        :-moz-placeholder { /* Upto Firefox 18, Deprecated in Firefox 19  */
           color: orange;  
        }
        ::-moz-placeholder {  /* Firefox 19+ */
           color: orange;  
        }
        :-ms-input-placeholder {  
           color: orange;  
        }
    
    0 讨论(0)
  • 2020-12-15 18:07

    textarea::placeholder {color: #fff;}

    0 讨论(0)
提交回复
热议问题