背景色为黑色的文本框禁用后,文字模糊_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:24:49
Original
1661 people have browsed it

文本框


请问文本框的背景色设为黑色的时候,禁用文本框,里面的文字变得很虚,这有方法弄下吗,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>body{margin:0px; padding:0px; font-size:12px; background:#999    }</style></head><body><input type="text" value="你好,背景色为黑色的文本框禁用后,文字模糊"  style="background:#3d4045; border:1px #666 solid; width:300px;  margin:100px" disabled="disabled" /></body></html>
Copy after login


回复讨论(解决方案)

吧 禁用改成 readonly

disabled="disabled" 
换成 
readonly= "readonly"

不行的,readonly= "readonly" 不是真正意义上的禁用,我要禁用后传不会传输,用readonly= "readonly"这个的话,提交的时候里面的值还是会传输的,而且还会获得光标焦点。所以这方法行不通。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!