经典论坛 » WEB标准化专栏 » IE6和IE7的quirks mode
酒酣几度
荣誉管理团队
专长 网页设计,前端制作,策划
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="utf-8"?> <!-- ... and keep IE7 in quirks mode --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- quirks mode --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
javascript:alert(document.compatMode)
查看个人网站
查看详细资料
TOP
状元
高级会员
专长 前端制作,产品设计,策划
专长 网页设计,前端制作,UE
初级会员
<!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"> <link href="style/index2.css" rel="stylesheet" type="text/css" /> <title>无标题文档</title> </head> <body> <div id="header"><!--TOP开始--> <div class="hearder_passprot"> <div class="p1"><a href="#">注册</a></div> <div class="p2"><label for="userName">用户名</label></div> <div class="p2"><input id="userName" name="username" /></div> </div> </div><!--TOP结束--> </body> </html>
/*首页样式*/ body,html{margin:0px;padding:0px;border:0px;font-size:12px;font-family:"宋体",arial;color:#000000;text-align:center;} div,form,img,ul,ol,li,dl,dt,dd{margin:0; padding:0; border:0;} h1,h2,h3,h4,h5,h6{ margin:0; padding:0;} /*字体属性定义规则小写f加属性名称*/ .fB {font-weight: bold;} .fI {font-style: italic;} /* 字体大小*/ .f12px{ font-size:12px;} .f14px{ font-size:14px;} /*图像图标*/ .img1{border-style:solid;border-color:#F0852D;border-width:1px;} /*链接样式*/ a:link{color:#000;text-decoration:none;} a:visited{color:#000;text-decoration:none;} a:hover{color:#666;text-decoration:underline;} a:active{color:#000;text-decoration:none;} /*登录框*/ #header{width:780px;height:83px;clear:both;margin-left:auto;margin-right:auto;margin-top:0px;background:#ffffff;} .hearder_passprot{width:780px;height:35px;margin:0 auto;} .hearder_passprot .p1{float:left; padding:11px 0 0 5px;} .hearder_passprot .p2{float:left; padding:11px 0 0 5px;} .hearder_passprot .p2 input{border:1px solid #000; width:50px; font-size:12px;}