Mobile compatibility problem when input adds disabled attribute

Problem: If you add the disabled attribute to the input, IOS will detect the disabled attribute and set gray and transparency to the default font of the input box, resulting in the placeholder and the input text appearing gray on the IOS side.

Baidu uses the following code


input[disabled],input:disabled,input.disabled{  
    color: #999;  
    -webkit-text-fill-color:#999;  
    -webkit-opacity:1;  
    opacity: 1;  
} 

With the above code, although the font color of the input box is solved, the color of the placeholder font cannot be set.

There is no good solution yet

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326989355&siteId=291194637
Recommended