当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > 应用IE6所不支持的CSS的type选择器

CSS样式表
网页表单在浏览器的表现实例
符合WEB标准的网页图像的代码精简
清除浮动clear:both的应用详解
WEB标准教程:功能丰富的段落P标签
针对class、id所做的CSS HACK
WEB标准教程:链接和文本标签的应用
看看网页高手怎么理解Web标准
WEB标准教程:P标签的应用
从腾讯网站首页改版学到的几点体会心得
解决网站防挂IFRAME木马的原理
Web标准:关于web标准的一些初学的知识
CSS实例:让页脚保持在未满屏页面的底部
CSS教程:弄懂闭合浮动元素
CSS教程:关于H1的使用技巧
css网页设计非常有用的解决办法
CSS高级技巧:网页布局
CSS实例:三列等高布局
Web标准前途是否依赖浏览器技术
Web标准:文档类型和网页浏览器
WEB标准学习经验总结

CSS样式表 中的 应用IE6所不支持的CSS的type选择器


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 35 ::
收藏到网摘: n/a

应用IE6所不支持的CSS的type选择器,可以精确的选择各种表单元素。
简单,明了,可以分区出各个input控件形态。
type选择器,IE6之前的对web标准支持的不太好的浏览器不能支持。致命……

代码如下:

<!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>
<title>IE6所不支持的CSS的type选择器 - www.52CSS.com</title>
<meta name="Keywords" content=""/>
<meta name="Description" content=""/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
input[type="text"]
{
background-color:#FFC;
}
input[type="password"]
{
background-image:url(BG.gif);
}
input[type="submit"]
{
background-color:blue;
color:white;
}
input[type="reset"]
{
background-color:navy;
color:white;
}
input[type="radio"]
{
/*In FF,Some radio style like background-color not been supported*/
margin:10px;
}
input[type="checkbox"]
{
/*In FF,Some checkbox style like background-color not been supported*/
margin:10px;
}
input[type="button"]
{
background-color:lightblue;
}
</style>
</head>
<body>
<dl>
<dt>This is normal textbox:<dd><input type="text" name="">
<dt>This is password textbox:<dd><input type="password" name="">
<dt>This is submit button:<dd><input type="submit">
<dt>This is reset button:<dd><input type="reset">
<dt>This is radio:<dd><input type="radio" name="ground1"> <input type="radio" name="ground1">
<dt>This is checkbox:<dd><input type="checkbox" name="ground2"> <input type="checkbox" name="ground2">
<dt>This is normal button:<dd><input type="button" value="i'm button">
</dl>
</body>
</html>