2011-04-11 276 views

回答

0

試試這個

<style> 
input { 
    color: rgb(60, 0, 248); /* change [input cursor color] by this*/ 
    text-shadow: 0px 0px 0px #D60B0B; /* change [input font] by this*/ 
    -webkit-text-fill-color: transparent; 
} 
</style> 
1

輸入型文本和下面的CSS

input,textarea { 
    color: #8f0407; 
    text-shadow: 0px 0px 0px #000 ; 
    -webkit-text-fill-color: transparent ; 
} 

input::-webkit-input-placeholder, 
    textarea::-webkit-input-placeholder { 
    color: #ccc; 
    text-shadow: none; 
    -webkit-text-fill-color: initial; 
} 

Codepen Demo

0

textarea的使用change caret color CSS了Mozilla docs

/* Keyword values */ 
caret-color: auto; 
caret-color: transparent; 
caret-color: currentColor; 

/* <color> values */ 
caret-color: red; 
caret-color: #5729e9; 
caret-color: rgb(0, 200, 0); 
caret-color: hsla(228, 4%, 24%, 0.8);