This commit is contained in:
2023-09-18 11:21:50 +08:00
parent 8038f02f30
commit 85e41f3ef9
31 changed files with 1802 additions and 30 deletions
+159 -28
View File
@@ -1,38 +1,169 @@
<!DOCTYPE html>
<html>
<!-- 头部分,主要是告知浏览器当前网页的附加信息,字符集,标题,样式等 -->
<head>
<meta charset="utf-8" />
<meta name="author" content="flykhan" />
<meta name="keywords" content="c c++ 物联网" />
<title>主页-Disen快乐C开发课堂</title>
<title>弹性盒子</title>
<style>
html,
body {
height: 100%; /* 100%的高度 */
margin: 0; /* 边距 */
padding: 0; /* 内边距 */
}
body {
display: flex;
flex-direction: column;
justify-content: space-between;
}
#top,
#footer {
/* height: 70px; 高度 */
background-color: lightblue;
}
#main {
height: 100%; /* 100%的高度 */
display: flex;
flex-direction: row;
}
#top {
display: flex; /* 弹性盒子 */
flex-direction: row; /* 水平排列 */
justify-content: space-between; /* 水平分布 */
justify-items: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
padding: 5px;
border-bottom: 1px solid firebrick;
}
#logo > img {
width: 50px;
height: 50px;
box-shadow: 0 0 10px 5px #fff;
border-radius: 50%;
}
#logo:hover > img {
position: absolute;
width: 100px;
height: 100px;
box-shadow: 0 0 20px 10px lightskyblue;
border-radius: 50%;
}
#footer {
height: 35px; /* 高度 */
border-top: 1px solid lightgray;
border-color: firebrick;
padding: 5px 0;
}
#menu {
width: 300px;
border-right: 1px solid lightgray;
margin: 20px;
}
iframe {
outline: none;
border: none;
}
#menu ul,
#menu li {
list-style: none;
padding: 0;
margin: 0;
}
#menu li {
margin: 10px 0; /* 上下间距为10px 左右不需要 */
/* overflow: hidden; 超出部分隐藏 */
}
#menu a {
display: block; /* 块级元素 */
text-decoration: none; /* 去掉下划线 */
color: black; /* 字体颜色 */
padding: 10px 20px; /* 上下10px 左右20px */
width: 80%; /* 宽度80% */
}
#menu a:hover {
/* 鼠标悬停 */
color: red; /* 字体颜色 */
background-color: aquamarine;
border-radius: 5px; /* 圆角 */
border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
}
</style>
</head>
<body>
<h1 id="top">所有课程列表</h1>
<a href="h.html" target="_blank" title="提示的信息">HTML的6个级别</a><br />
<a href="hi.html" target="content_frame">第一个页面</a><br />
<a href="meta.html" target="content_frame">meta标签</a><br />
<a href="table.html" target="_blank">个人简历</a><br />
<a href="table2.html" target="content_frame">libnet库函数列表</a><br />
<a href="form1.html" target="_blank">表单1</a><br />
<a href="form2.html" target="_blank">注册用户</a><br />
<a href="form3.html" target="_blank">上报数据</a><br />
<a href="form4.html" target="_blank">内联样式</a><br />
<a href="css1.html" target="_blank">css1</a><br />
<div id="top">
<div id="logo">
<img src="./images/google-2.ico" alt="logo" />
</div>
<div id="user_info">
登录用户 <span id="userName"></span
><span class="logout" onclick="logout()">登出</span>
</div>
</div>
<div id="main">
<div id="menu">
<ul class="menu-list">
<h3>自定义样式</h3>
<li class="menu-item">
<a href="css1.html" target="content_frame">css1</a>
</li>
<li class="menu-item">
<a href="css2.html" target="content_frame">css2</a>
</li>
<li class="menu-item">
<a href="css4.html" target="content_frame">图片列表</a>
</li>
<h3>Form标签</h3>
<li class="menu-item">
<a href="form1.html" target="content_frame">form1</a>
</li>
<li class="menu-item">
<a href="form2.html" target="content_frame">form2</a>
</li>
<li class="menu-item">
<a href="form3.html" target="content_frame">form3</a>
</li>
</ul>
</div>
<div id="content" style="width: 100%">
<iframe name="content_frame" width="100%" height="100%"> </iframe>
</div>
</div>
<div id="footer" style="text-align: center">
<b>版权所有© 福来科瀚</b><br />
<i>Flykhan: 000111010</i>
</div>
<a href="#footer">前往底部</a><br />
<a
href="http://www.biquge66.net/book/101/204087.html"
target="content_frame"
>上门龙婿-第一集</a
><br />
<script>
window.onload = function () {
// 验证当前浏览器用户是否已经登录
if (localStorage.getItem("login_user") == null) {
open("/login.html", "_self");
} else {
let login_user_str = localStorage.getItem("login_user");
let login_user = JSON.parse(login_user_str);
<!-- 页内窗口 -->
<iframe name="content_frame" width="100%" height="600px"></iframe>
<div style="height: 800px"></div>
<p id="footer">
我是最后一段信息...
<a href="#top">回到顶部</a>
</p>
userName.innerText = login_user.nickName;
}
};
function logout() {
localStorage.clear();
open("/login.html", "_self");
}
</script>
</body>
</html>