点击这里给我发消息 点击这里给我发消息

CSS+DIV设计实例:实现让多个DIV排列时居中

添加时间:2010-1-5
    相关阅读: 设计 HTML CSS AI

<?xml version="1.0" encoding="iso-8859-1"?>
<!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>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body {text-align:center}
#outer {
 width:60%;
 background:#ffffcc;
 margin:auto;
 text-align:center;
}
.inner {
 width:100px;
 height:100px;
 margin:5px;
 border:1px solid #000;
}
* html .inner {display:inline}/* for ie*/
html>body #outer {display:table}/*for <a href="/keys/mozilla/index.html" target="_blank">mozilla</a> */
html>body .inner {display:table;float:left}/*for mozilla */
@media all and (min-width: 0px){/* <a href="/keys/opera/index.html" target="_blank">opera</a> 7 styles */
html>body .inner {display:inline-block;float:none;}
}

</style>
</head>
<body>
<!-- force quirks mode by using the xml pro-logue -->
<div id="outer">
  <div class="inner">test</div>
  <div class="inner">2</div>
  <div class="inner">3</div>
  <div class="inner">4</div>
  <div class="inner">5</div>
  <div class="inner">6</div>
  <div class="inner">7</div>
  <div class="inner">8</div>
  <div class="inner">9</div>
  <div class="inner">10</div>
  <div class="inner">11</div>
  <div class="inner">12</div>
  <div class="inner">13</div>
  <br style="clear:both" />
</div>
</body>
</html>
<script language="Javascript">
var now = new Date();
document.write("<img src='http://counter.yesky.com/counter.shtml?CID=54197&AID=-1&refer="+escape(document.referrer)+"&rand="+ now.getTime()  + "&cur="+escape(document.URL)+"' border='0' alt='' width='0' height='0'>");
</script>
<noscript>
<img src="http://counter.yesky.com/counter.shtml?CID=54197&AID=-1&refer=noscriptcounter&cur=noscriptcounter" border='0' width='0' height='0'/>
</noscript>

本文作者:
咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册