
批改狀態(tài):不合格
老師批語(yǔ):本次作業(yè) 再三強(qiáng)調(diào),使用傳統(tǒng)的float+position實(shí)現(xiàn), 不允許使用grid,flex
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CMS系統(tǒng)首頁(yè)</title>
<link rel="stylesheet" href="css/font/iconfont.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<div class="all">
<!-- 頁(yè)面頂部部分-->
<div class="page_top ">
<!-- 頂部?jī)?nèi)容-->
<div class="top logo">
<img src="images/logo.png" alt="logo">
</div>
<!-- 頂部留白-->
<div class="top blank"></div>
<!-- 頂部搜索框-->
<div class="top search">
<span>
<i class="iconfont"></i>
</span>
</div>
<!-- 頂部圖標(biāo)-->
<div class="top ioc">
<ul>
<li><a href=""><span class="iconfont"></span></a></li>
<li><a href=""><span class="iconfont"></span></a></li>
<li><a href=""><span class="iconfont"></span></a></li>
<li><a href=""><span class="iconfont"></span></a></li>
<li><a href=""><span class="iconfont"></span></a></li>
<li><a href=""><span class="iconfont"></span></a></li>
<li class="clear"></li>
</ul>
</div>
<!-- 頂部 nav導(dǎo)航欄-->
<div class="nav a">
<span class="iconfont span_one"></span>
<table cellspacing="0">
<tr>
<td class="td_one"><a href="">資訊</a></td>
<td><a href="">器材</a></td>
<td><a href="">大師</a></td>
<td><a href="">學(xué)院</a></td>
<td><a href="">實(shí)戰(zhàn)</a></td>
</tr>
<tr>
<td class="td_one" >資訊</td>
<td>器材</td>
<td>大師</td>
<td>學(xué)院</td>
<td>實(shí)戰(zhàn)</td>
</tr>
</table>
<span class="clear"></span>
</div>
<div class="nav b">
<span class="iconfont span_one"></span>
<table cellspacing="0">
<tr>
<td class="td_one"><a href="">資訊</a></td>
<td><a href="">器材</a></td>
<td><a href="">大師</a></td>
<td><a href="">學(xué)院</a></td>
<td><a href="">實(shí)戰(zhàn)</a></td>
</tr>
<tr>
<td class="td_one" >資訊</td>
<td>器材</td>
<td>大師</td>
<td>學(xué)院</td>
<td>實(shí)戰(zhàn)</td>
</tr>
</table>
<span class="clear"></span>
</div>
<div class="nav c">
<span class="iconfont span_one"></span>
<table cellspacing="0">
<tr>
<td class="td_one"><a href="">資訊</a></td>
<td><a href="">器材</a></td>
<td><a href="">大師</a></td>
<td><a href="">學(xué)院</a></td>
<td><a href="">實(shí)戰(zhàn)</a></td>
</tr>
<tr>
<td class="td_one" >資訊</td>
<td>器材</td>
<td>大師</td>
<td>學(xué)院</td>
<td>實(shí)戰(zhàn)</td>
</tr>
</table>
<span class="clear"></span>
</div>
<div class="nav d">
<span class="iconfont span_one"></span>
<table cellspacing="0">
<tr>
<td class="td_one"><a href="">資訊</a></td>
<td><a href="">器材</a></td>
<td><a href="">大師</a></td>
<td><a href="">學(xué)院</a></td>
<td><a href="">實(shí)戰(zhàn)</a></td>
</tr>
<tr>
<td class="td_one" >資訊</td>
<td>器材</td>
<td>大師</td>
<td>學(xué)院</td>
<td>實(shí)戰(zhàn)</td>
</tr>
</table>
<span class="clear"></span>
</div>
<!-- 頂部 banner圖內(nèi)容-->
<div class="banner lefts">
<img src="images/2.jpg" alt="banner left">
</div>
<div class="banner rights">
<img src="images/banner-right.jpg" alt="banner right">
</div>
</div>
<!--頁(yè)面中部?jī)?nèi)容部分-->
<div class="page_content">
<p>content</p>
</div>
<!--頁(yè)面底部版權(quán)與連接部分-->
<div class="page_footer">
<p>footer</p>
</div>
<div class="clear"></div>
</div>
</body>
</html>
/*字體圖標(biāo)資源引入*/
@font-face {
font-family: 'iconfont';
src: url('font/iconfont.eot');
src: url('font/iconfont.eot?#iefix') format('embedded-opentype'),
url('font/iconfont.woff2') format('woff2'),
url('font/iconfont.woff') format('woff'),
url('font/iconfont.ttf') format('truetype'),
url('font/iconfont.svg#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont",serif !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/*頁(yè)面通用樣式設(shè)置*/
*{
margin: 0;
padding: 0;
}
body{ font-size: 13px;}
ul{ display: inline-block;}
ul li{
float: left;
list-style: none;
}
a{
color: black;
text-decoration: none;
font-size: 13px;
}
table{
width: 260px;
height: 60px;
margin: 45px 0 0 -20px;
/* border: 1px solid lightcoral;*/
float: left;
}
td{
width: 40px;
height: 30px;
line-height: 30px;
text-align: center;
/* border: 1px solid red;*/
}
.all{
width: 84%;
height: 1200px;
margin: 0 8% 0 8%;
}
/*頁(yè)面頭部樣式*/
.page_top{
width: 100%;
height: 560px;
/*將元素轉(zhuǎn)換為網(wǎng)格 grid*/
display: grid;
/*設(shè)置網(wǎng)格個(gè)寬度*/
grid-template-columns: 60px 140px 160px 50px 340px 50px 350px 50px 50px 350px;
/*設(shè)置網(wǎng)格的高度*/
grid-template-rows: 80px 120px 360px;
float: left;
}
/* 設(shè)置網(wǎng)格中各單元格的位置
grid-column: 7 / 8; 合并 7-8列
grid-row: 1/10; 合并1-10行
*/
/*頂部logo所在行 網(wǎng)格區(qū)域設(shè)置 */
.logo{ grid-column: 1 / 3;grid-row: 1 / 2;}
.blank{ grid-column: 3 /6;grid-row: 1 / 2;}
.search{ grid-column: 6/9; grid-row: 1/2;}
.ioc{grid-column: 9/11; grid-row: 1/2;}
/*頂部導(dǎo)航部分 網(wǎng)格區(qū)域設(shè)置*/
.a{ grid-column: 1/4;grid-row: 2/3;}
.b{ grid-column: 4/6;grid-row: 2/3;}
.c{ grid-column: 6/9; grid-row: 2/3;}
.d{ grid-column: 9/11; grid-row: 2/3;}
/*頂部 banner圖部分 網(wǎng)格區(qū)域設(shè)置*/
.lefts{ grid-column: 1/9; grid-row: 3/4;}
.rights{ grid-column: 9/11; grid-row: 3/4;}
/*search*/
.search span{
width: 280px;
height: 40px;
margin:20px 0 0 100px ;
border: 1px solid gray;
display: inline-block;
vertical-align: middle;
border-radius: 13px;
}
.search i{
font-size: 25px;
margin: 5px 0 0 240px;
/*相對(duì)父元素定位*/
position: absolute;
}
/*ioc*/
.ioc ul {
margin: 20px 0 0 0;
}
.ioc ul li a span {
width: 54px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 30px;
margin-left: 10px;
display: inline-block;
}
/*導(dǎo)航圖標(biāo)*/
.span_one{
width:80px ;
height: 70px;
font-size: 45px;
color: #ff2017;
margin: 50px 0 0 20px;
display: block;
float: left;
}
/*導(dǎo)航首列邊框*/
.td_one{
border-right: 2px solid #cccccc;
}
/*頂部 banner圖樣式*/
.lefts img{
width: 1194px;
height: 360px;
}
.rights img{
width: 400px;
height: 360px;
}
/*頁(yè)面中部?jī)?nèi)容樣式*/
.page_content{
width: 100%;
height: 560px;
background: cornflowerblue;
float: left;
}
/*頁(yè)面底部樣式*/
.page_footer{
width: 100%;
height: 80px;
background: coral;
float: left;
}
.clear{
clear: both;
}
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)