From 1ebc7c64d216450b61be46486fffd1950cc80e60 Mon Sep 17 00:00:00 2001
From: vincent <1341870251@qq.com>
Date: 星期二, 26 五月 2020 21:46:54 +0800
Subject: [PATCH] #
---
src/main/webapp/static/css/common.css | 20 ++++++
src/main/webapp/views/crn.html | 10 +++
src/main/webapp/views/index.html | 71 +++++++++++++++++------
src/main/webapp/views/stock.html | 34 +++++++++++
src/main/webapp/views/led.html | 10 +++
5 files changed, 125 insertions(+), 20 deletions(-)
diff --git a/src/main/webapp/static/css/common.css b/src/main/webapp/static/css/common.css
new file mode 100644
index 0000000..3d1a6e4
--- /dev/null
+++ b/src/main/webapp/static/css/common.css
@@ -0,0 +1,20 @@
+/* 缁熶竴澶勭悊 */
+*, *::before, *::after {
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+}
+html {
+ line-height: 1.5;
+ font-size: 15px;
+ font-family: sans-serif;
+ height: 100%;
+}
+body {
+ height: 100%;
+}
+
+iframe {
+ border-width: 0;
+}
\ No newline at end of file
diff --git a/src/main/webapp/views/crn.html b/src/main/webapp/views/crn.html
new file mode 100644
index 0000000..85a8695
--- /dev/null
+++ b/src/main/webapp/views/crn.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Title</title>
+</head>
+<body>
+<h1>LED</h1>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index e3e48a8..fe2e32b 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -7,37 +7,68 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" type="text/css" href="../static/css/normalize.css">
+ <link rel="stylesheet" type="text/css" href="../static/css/common.css">
+ <script type="text/javascript" src="../static/js/jquery/jquery-3.3.1.min.js"></script>
+ <script type="text/javascript" src="../static/js/common.js"></script>
<style>
- /* 缁熶竴澶勭悊 */
- *, *::before, *::after {
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- margin: 0;
- padding: 0;
+ /* 瀵艰埅 */
+ .nav {
+ background-color: #333;
+ list-style-type: none;
+ position: fixed;
+ width: 100%;
+ overflow: hidden;
}
- html {
- line-height: 1.5;
- font-size: 15px;
+ .nav li {
+ float: left;
+ }
+ .nav li a {
+ display: block;
+ text-decoration: none;
+ padding: 12px 16px;
+ text-align: center;
+ }
+ .nav li a:hover {
+ color: #fff;
+ }
+ .nav li.right {
+ float: right;
}
- .nav {
- background-color: #fd5830;
+ .nav-unselect {
+ color: rgba(255,255,255,.7);
}
- .nav ul li {
- list-style-type: none;
+ .nav-select {
+ background-color: #a62d2d;
+ color: #fff;
+ }
+
+ #content {
+ box-sizing: border-box;
+ padding-top: 46px;
+ width: 100%;
+ height: 100%;
}
</style>
</head>
<body>
-<div class="nav">
- <ul>
- <li>瀵艰埅涓�</li>
- <li>瀵艰埅浜�</li>
- <li>瀵艰埅涓�</li>
- <li>瀵艰埅鍥�</li>
+ <ul class="nav">
+ <li><a id="stock" onclick="nav(this.id)" class="nav-select" href="#">瀵艰埅涓�</a></li>
+ <li><a id="crn" onclick="nav(this.id)" class="nav-unselect" href="#">瀵艰埅浜�</a></li>
+ <li><a id="led" onclick="nav(this.id)" class="nav-unselect" href="#">瀵艰埅涓�</a></li>
+ <li class="right"><a id="about" class="nav-unselect" onclick="nav(this.id)" href="#">鍏充簬</a></li>
</ul>
-</div>
+
+ <iframe id="content" src="stock.html"></iframe>
+
</body>
+<script>
+ function nav(id) {
+ $('.nav-select').attr("class", "nav-unselect");
+ $('#'+id).attr("class", "nav-select");
+ }
+
+</script>
</html>
diff --git a/src/main/webapp/views/led.html b/src/main/webapp/views/led.html
new file mode 100644
index 0000000..85a8695
--- /dev/null
+++ b/src/main/webapp/views/led.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Title</title>
+</head>
+<body>
+<h1>LED</h1>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/views/stock.html b/src/main/webapp/views/stock.html
new file mode 100644
index 0000000..6c2e403
--- /dev/null
+++ b/src/main/webapp/views/stock.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Title</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" type="text/css" href="../static/css/normalize.css">
+ <link rel="stylesheet" type="text/css" href="../static/css/common.css">
+ <style>
+ html {
+ height: 100%;
+ }
+ body {
+ height: 100%;
+ background-color: #007DDB;
+ }
+ #container {
+ position: relative;
+ }
+ #box {
+ position: absolute;
+ top: 15px;
+ left: 30px;
+ }
+ </style>
+</head>
+<body>
+<div id="container">
+ <div id="box">box</div>
+</div>
+</body>
+</html>
\ No newline at end of file
--
Gitblit v1.9.1