一个简单的网页系统(-) 首页
来源:互联网 发布:pano2vr软件下载 编辑:程序博客网 时间:2024/05/17 07:45
一个简单的网页系统(一)
最近心血来潮写了一个网页系统,用来分享自己游玩的地方。主要使用到了leaflet.js d3.js myfocus.js jquery等JS 库。
一. 效果展示
二. 结构分析
(1)导航栏 : logo可以在线免费自定义制作。导航栏无非是<ul></ul> 里面包含几个<li>标签,标签里面套一个超链接。
并设置ul list-style:none; 以及链接a text-decoration:none; float:left; 以及a 的四种状态。
(2)图片栏 :使用了myFocus 的JS库,比较简单。类似于BootStrap,为<div>添加相应的类名即可。
(3)展示栏:分为左中右,结构相似。灵活使用float属性。此处使用动态分配每部分宽度。
三. 代码分析
代码格式看起来比较乱,尤其是style部分没有对齐(在代码中对齐可能显示在博客中有 <span>标签)。不过能通过格式化软件格式化
<!DOCTYPE html><html><head><title>Index Page</title><meta charset="utf-8"><style type="text/css">*{margin: 0;padding: 0;}body,html{width: 100%;font-family: '微软雅黑';}.menu{height: 40px;background-color: rgb(234,234,234);width: 100%;margin-bottom: 1px;}.front{height:10px;}.menu ul{ list-style: none;margin-left: 10%;margin-top: 0;height: 40px;line-height: 40px;}.menu img{float: left;margin-right: 5%;}.menu ul li{list-style: none;float: left;width:15%;padding: 0 4%;height:40px;line-height: 40px; }.menu ul li a{padding: 0 20%;text-decoration: none;color: black;background-color: rgba(234,234,234,0.8);text-align: center;}.menu ul li a:hover,.menu ul li a:active{color: white; background-color: rgba(229,229,229,0.2);}#boxID{ width:1200px; height: 171px; border-color: rgb(234,234,234); } .index{ background-color: rgb(234,234,234); } .wrap{ margin:0 auto; padding: 0; } #b{ color: black; } .main{ margin-top: 1px; height:300px; width:100%; background: #FFFFDD; border-bottom: 1px solid rgb(234,234,234); border-left: 1px solid white; border-right: 1px solid white; } .left{ margin: 0 0.5% 0 0.9%; background-color: white; width: 32%; float: left; height: 300px; font-size:15px; border-left: 1px solid white; } .left h3,.right h3, .mid h3{ margin:20px 0 0 20px; display: inline; } .mid{ background-color: white; width: 32%; float: left; height: 300px; margin: 0 0.5%; } .right{ margin: 0 0.9% 0 0.5%; background-color:white; width: 32%; height: 300px; float: left; } .titleR{ float: right; display: inline; } .titleR a{ text-decoration: none; } .line{ background-color: rgb(234,234,234); height: 2px; margin: 0 1% 2px; } .left ul li,.mid ul li,.right ul li{ list-style: none; height: 30px; line-height: 30px; margin: 0 1%; border-bottom: 1px dashed rgba(234,234,234,0.8); } .left ul li a,.mid ul li a,.right ul li a{ text-decoration: none; color: grey; } .cc{ margin: 0 auto; }</style></head><body> <div class="front"></div> <div class="menu"><img src="img/logo.png"><ul> <li><a href="firstPage.html">首页</a></li><li><a href="index.html">Tour</a></li><li><a href="vis.html">Visulation</a></li></ul> </div> <div class="index"> <div id="boxID" class="wrap"> <div class="loading"><img src="img/loading.gif" alt="请稍候..." /></div><!--载入画面(可删除)--> <div class="pic"><!--内容列表(li数目可随意增减)--> <ul> <li><a href="china-tour/beiJing.html" id="b"><img src="img/index/i12.jpg" thumb="" alt="北京-故宫" text="详细描述1" /></a></li> <li><a href="china-tour/qinH.html"><img src="img/index/i22.jpg" thumb="" alt="秦皇岛-山海关" text="详细描述2" /></a></li> <li><a href="china-tour/daLian.html" ><img src="img/index/i32.jpg" thumb="" alt="大连-旅顺港" text="详细描述3" /></a></li> </ul> </div> </div> </div> <div class="main"> <div class="left"> <h3>Tour</h3> <p class="titleR"><a href="index.html">more>></a></p> <div class="line"></div> <ul> <li><a href="china-tour/beiJing.html">故宫博物馆</a><p class="titleR">AAAAA级景区</p></li> <li><a href="china-tour/beiJing.html">天坛公园</a><p class="titleR">AAAAA级景区</p></li> <li><a href="china-tour/daLian.html">大连金石滩度景区</a><p class="titleR">AAAAA级景区</p></li> <li><a href="china-tour/qinH.html">秦皇岛北戴河景区</a><p class="titleR">AAAA级景区</p></li> <li><a href="china-tour/daLian.html">大连圣亚海洋世界</a><p class="titleR">AAAA级景区</p></li> <li><a href="china-tour/daLian.html">旅顺白云山景区</a><p class="titleR">AAAA级景区</p></li> <li><a href="china-tour/liaoYang.html">辽阳白塔公园</a><p class="titleR">AAA级景区</p></li> <li><a href="china-tour/qinH.html">秦皇岛山海关景区</a><p class="titleR">原AAAAA级景区</p></li> </ul> </div> <div class="mid"> <h3>Visulation</h3> <p class="titleR"><a href="vis.html">more>></a></p> <div class="line"></div> <div class="cc"> <img src="img/vis1.png"> </div> <ul> <li><a href="china/leafletDemoChinaMail.html">ChinaMail</a><p class="titleR">2016 1-10月</p></li> <li><a href="china/leafletDemoPopulationDesity.html">ChinaPopulationDedity</a><p class="titleR">2016 34省市</p></li> </ul> </div> <div class="right"> <h3>Self</h3> <p class="titleR"><a href="#">more>></a></p> <div class="line"></div> <div class="cc"> <img src="img/logo3.png"> </div> <ul> <li><a href="http://blog.csdn.net/lccla120712">CSDN Blog</a><p class="titleR">2017-04-18</p></li> <li><a href="https://github.com/LiuChengCheng-Jack">My GitHub</a><p class="titleR">2017-04-26</p></li> <li><a href="#">My Scores</a><p class="titleR">2017-04-26</p></li> <li><a href="#">My Rewards</a><p class="titleR">2017-04-26</p></li> </ul> </div> </div> <script type="text/javascript" src="js/myfocus-2.0.1.min.js"></script> <script type="text/javascript"> myFocus.set({ id:'boxID', pattern:'mF_fancy'//风格 }); </script></body></html>
四. 后期工作
首页只是网页的一部分,之后还会分享其他部分,并给出gitHub 源码位置。
1 0
- 一个简单的网页系统(-) 首页
- 一个简单首页的布局
- 《基础网页制作》div加float实现一个简单的首页
- 一个简单的网站首页制作
- 如何判断一个网页是不是一个Blog的首页?
- 一个简单的网页系统(二)-地图界面
- 一个简单的网页计数器
- 一个简单的网页程序
- 一个简单的验证网页
- 一个简单的网页游戏
- 一个简单的网页小游戏
- 一个简单的网页爬虫
- 一个简单的网页系统Tour(终结) 和效果展示图
- 一个简单的网页编写的例子
- 第二讲 创建一个简单的网页
- 一个超级简单的网页播放器
- 一个简单的JAVA网页爬虫
- 一个简单的网页播放器
- TensorFlow实现去噪自编码器及使用—Masking Noise Auto Encoder
- 第二本书unit4分区
- 不同操作系统下域名解析文件是不同的
- SPOJ
- 我的python进阶之路二
- 一个简单的网页系统(-) 首页
- 2017阿里C/C++暑期实习生在线笔试附加题编程题之一。。
- mongodb学习笔记--C++操作mongodb
- Makefile 使用总结
- 完整学习笔记之Android基础(简版)
- Linux基础学习之如何修改虚拟机中centos锁屏时间(图形界面下)
- tabhost TabSpec执行setContent时出现空指针异常NullPointerException
- Codevs 2822 爱在心中
- fflush()