如何在XHTML表单中设置文本框的backgroundcolor! [英] How to set backgroundcolor of a textbox in an XHTML form!
本文介绍了如何在XHTML表单中设置文本框的backgroundcolor!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在下面,我粘贴了我正在开发的源代码,但仍然无法从Mozilla Firefox& IE具有最新版本.
我也已经使用W3C验证服务对此进行了验证,该服务没有给出错误提示!如果时间允许,请尝试解决此问题!
谢谢
奇兰萨卡
At the bellow I have paste the source code that I have been developing but still I cannot get the correct output form both Mozilla Firefox & IE with newest versions.
I also I have validate this using W3C validation service that had not given error on that! If you are able to have small time please try to solve this!
Thanks
Chiranthaka
<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en" lang="en">
<head>
<title><!-- Insert your title here --></title>
<style type="text/css">
input.red { background-color: blue }
inpute [type="text] {background-color: red}
</style>
</head>
<body>
<!-- Insert your content here -->
<form action="my.php" method="post">
Name: <input class="red" type="text" /> <br/>
Address: <input type="text" />
</form>
</body>
</html>
推荐答案
您可以使用CSS类,例如
Hi,
you can do with CSS class like,
<style type="text/css">
.textbox { background-color:#00BFFF; }
</style>
<input type="text" class="textbox" id="your_id" title="YourTitle" />
希望这种方式对您有帮助,
谢谢
-Amit Gajjar
Hope this way will help you,
Thanks
-Amit Gajjar
这篇关于如何在XHTML表单中设置文本框的backgroundcolor!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文