读书人

input 颜色设置解决方案

发布时间: 2012-03-16 16:34:56 作者: rapoo

input 颜色设置
<%@ Page Language= "C# " AutoEventWireup= "true " CodeFile= "Default27.aspx.cs " Inherits= "Default27 " %>

<!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 runat= "server ">
<title> Untitled Page </title>
<style type= "text/css ">
input:focus {background-color:red;}
</style>
</head>
<body>
<form id= "form1 " runat= "server ">
<div>
<input runat= "server " id= "Button1 " type= "button " value= "button " onserverclick= "Button1_ServerClick1 " /> </div>
<input type= "text " />
<input type= "text " />
</form>
</body>
</html>

我想知道为什么我的input获得焦点,颜色不会变红。

[解决办法]
只知道A标记的用法,学习
[解决办法]
因为ie不支持:focus
[解决办法]
我用的Opera浏览器,测试通过!没有问题.
[解决办法]
好像IE不行~~

读书人网 >CSS

热点推荐