Home > Web Front-end > HTML Tutorial > After the text box with black background color is disabled, the text is blurred_html/css_WEB-ITnose

After the text box with black background color is disabled, the text is blurred_html/css_WEB-ITnose

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

Text box


When the background color of the text box is set to black, disable the text box and the text inside becomes very blurry. Is there a way to fix this?
<!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


Reply to discussion (solution)

Change disabled to readonly

disabled="disabled"
Change to
readonly = "readonly"

No, readonly="readonly" is not disabled in the true sense. If I want to disable post-transmission, it will not be transmitted. If readonly="readonly" is used, the value inside will still be when submitted. It will be transferred, and it will also get the cursor focus. So this method doesn't work.

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