
批改狀態(tài):合格
老師批語:
1、代碼:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>我的后臺布局</title>
<style>
*{
padding: 0;
margin: 0;
text-decoration: none;
color:black;
box-sizing: border-box;
}
header{
width: 100%;
height: 60px;
background-color: #2C3E50;
line-height: 60px;
padding-left: 20px;
font-size: 20px;
/* color:white; */
}
header > span {
color:white;
}
.main{
width: 100%;
position: absolute;
top:60px;
left:0;
bottom: 0;
}
.main > aside{
text-align: center;
width: 140px;
float:left;
background-color: #66CDAA;
position: absolute;
top:0;
bottom:0;
}
.main > aside > h3{
color:white;
margin: 15px auto;
}
.main > aside > ul{
list-style: none;
}
.main > aside > ul >li{
display: block;
width: 100%;
height: 40px;
line-height: 40px;
background-color: #42B983;
margin: 4px auto;
}
.main > aside > ul > li > a:hover{
color:white;
}
.main > aside > ul > li > a:active{
color:#D3D3D3;
}
.main > main{
background-color: #90EE90;
position: absolute;
top:0;
left:140px;
right: 0;
bottom:0;
}
.main > main > iframe{
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<header>
<span>XXXX后臺管理</span>
</header>
<div class="main">
<aside>
<h3>功能菜單</h3>
<ul>
<li><a href="http://www.baidu.com" target="backpage">百度首頁</a></li>
<li><a href="https://www.zhongyequan.cn" target="backpage">種業(yè)圈</a></li>
<li><a href="http://weibo.com" target="backpage">微博首頁</a></li>
<!-- <li><a target="backpage">項目四</a></li> -->
<li><a href="https://j.map.baidu.com/aa/7uE" target="backpage">聯(lián)系我們</a></li>
</ul>
</aside>
<main>
<iframe srcdoc="<div style='text-align:center;position:relative;top:300px;font-size:38px;color:white;'> XXXX后臺管理界面</div>" name="backpage" frameborder="0"></iframe>
</main>
</div>
</body>
</html>
2、代碼運行結(jié)果:
3、相關(guān)知識點(iframe標(biāo)簽相關(guān)屬性):
1、CSS使用的的三種方式:
<link rel="stylesheet" href="文件路徑地址"/>
2、CSS基本選擇(標(biāo)簽選擇器,類選擇器,id選擇器)的選擇器:
***元素內(nèi)CSS>id>類>標(biāo)簽***
通過`!important`來設(shè)置可以把優(yōu)先級提到最高
標(biāo)簽[]屬性選擇器
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號