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

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

WBOY
WBOYOriginal
2016-06-24 12:24:491661Durchsuche

文本框


请问文本框的背景色设为黑色的时候,禁用文本框,里面的文字变得很虚,这有方法弄下吗,
<!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>


回复讨论(解决方案)

吧 禁用改成 readonly

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

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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn