<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>全兼容的HTML
九宫格布局</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> </head> <body> <html> <head> <style type="text/css"> /** 重置浏览器默认标签样式 */ body,ul,li{margin:0padding:0} .xttblog{width: 1200px height: 170px margin-top:50px margin-left: auto margin-right: auto } .box{margin-left: 5pxmargin-top: 5pxlist-style-type:none} .box:after{content: "." display: block line-height: 0 width:0 height: 0 clear: both visibility: hidden overflow: hidden } .box li{float:leftline-height: 230px} .box li a,.box li a:visited{display:block border: 5px solid #ccc width: 380px height: 230px text-align: center margin-left: -5px margin-top: -5px position: relative z-index: 1 } .box li a:hover{border-color: #f00z-index: 2} </style> </head> <body> <div class="xttblog"> <ul class="box"> <li><a href="#" title="1"><img src="sh.jpg"/></a></li> <li><a href="#" title="2"><img src="bd.jpg"/></a></li> <li><a href="#" title="3"><img src="tb.jpg"/></a></li> <li><a href="#" title="4"><img src="fh.jpg"/></a></li> <li><a href="#" title="5"><img src="tb.jpg"/></a></li> <li><a href="#" title="6"><img src="tb.jpg"/></a></li> <li><a href="#" title="7"><img src="tb.jpg"/></a></li> <li><a href="#" title="8"><img src="tb.jpg"/></a></li> <li><a href="#" title="9"><img src="tb.jpg"/></a></li> </ul> </div> </body> </html> 源码,有些不一样,自己改下,html+css不懂得话,得自学下,这个是很简单的了,可以看下php
中文网的一些课程,我自己
也是自学的,网楼主采纳!<!DOCTYPE <html>
<head>
<meta http-equiv="Content-Type" content="text/html charset=utf-8" />
<title>无标题</title>
<style type="text/css">
td {
height:30px
width:30px
border: solid 1px
}
table {
border:solid 1px
}
</style>
</head>
<body>
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>
这样子很萌有没有- -
评论列表(0条)