利用@media screen实现网页布…

本文详细介绍了如何使用CSS3 Media查询实现网页自适应布局,包括设置元标签、加载兼容文件等准备工作,并提供了不同屏幕尺寸下的具体应用案例。

优点:无需插件和手机主题,对移动设备友好,能够适应各种窗口大小。只需在CSS中添加@media screen属性,根据浏览器宽度判断并输出不同的长宽值

 

 

准备工作1:设置Meta标签

首先我们在使用Media的时候需要先设置下面这段代码,来兼容移动设备的展示效果:

  1.  name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

这段代码的几个参数解释:

  • width = device-width:宽度等于当前设备的宽度

  • height = device-height:高度等于当前设备的高度

  • initial-scale:初始的缩放比例(默认设置为1.0)  

  • minimum-scale:允许用户缩放到的最小比例(默认设置为1.0)    

  • maximum-scale:允许用户缩放到的最大比例(默认设置为1.0)   

  • user-scalable:用户是否可以手动缩放(默认设置为no,因为我们不希望用户放大缩小页面) 

 

准备工作2:加载兼容文件JS

因为IE8既不支持HTML5也不支持CSS3 Media,所以我们需要加载两个JS文件,来保证我们的代码实现兼容效果:

 

准备工作3:设置IE渲染方式默认为最高(这部分可以选择添加也可以不添加)

现在有很多人的IE浏览器都升级到IE9以上了,所以这个时候就有又很多诡异的事情发生了,例如现在是IE9的浏览器,但是浏览器的文档模式却是IE8:

为了防止这种情况,我们需要下面这段代码来让IE的文档模式永远都是最新的:

  1.  http-equiv="X-UA-Compatible" content="IE=edge">

 (如果想使用固定的IE版本,可写成:)


不过我最近又发现了一个更给力的写法:

  1.  http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

怎么这段代码后面加了一个chrome=1,这个Google Chrome Frame(谷歌内嵌浏览器框架GCF),如果有的用户电脑里面装了这个chrome的插件,就可以让电脑里面的IE不管是哪个版本的都可以使用Webkit引擎及V8引擎进行排版及运算,无比给力,不过如果用户没装这个插件,那这段代码就会让IE以最高的文档模式展现效果。这段代码我还是建议你们用上,不过不用也是可以的。

 

进入CSS3 Media写法

我们先来看下下面这段代码,估计很多人在响应式的网站CSS很经常看到类似下面的这段代码:

  1. @media screen and (max-width960px){
  2.     body{
  3.         background: #000;
  4.     }
  5. }

这个应该算是一个media的一个标准写法,上面这段CSS代码意思是:当页面小于960px的时候执行它下面的CSS.这个应该没有太大疑问。

 

应该有人会发现上面这段代码里面有个screen,他的意思是在告知设备在打印页面时使用衬线字体,在屏幕上显示时用无衬线字体。但是目前我发现很多网站都会直接省略screen,因为你的网站可能不需要考虑用户去打印时,你可以直接这样写:

  1. @media (max-width960px){
  2.     body{
  3.         background: #000;
  4.     }
  5. }

 

CSS2 Media用法

其实并不是只有CSS3才支持Media的用法,早在CSS2开始就已经支持Media,具体用法,就是在HTML页面的head标签中插入如下的一段代码:

  1. ="stylesheet" type="text/css" media="screen" href="style.css">

 

上面其实是CSS2实现的衬线用法,那CSS2的media难道就只能支持上面这一个功能吗?答案当然不是,他还有很多用法。

 

例如我们想知道现在的移动设备是不是纵向放置的显示屏,可以这样写:

  1. ="stylesheet" type="text/css" media="screen and (orientation:portrait)" href="style.css">

 

我们把第一段的代码也用CSS2来实现,让它一样可以让页面宽度小于960的执行指定的样式文件:

  1. ="stylesheet" type="text/css" media="screen and (max-width:960px)" href="style.css">

 

既然CSS2可以实现CSS的这个效果为什么不用这个方法呢,很多人应该会问,但是上面这个方法,最大的弊端是他会增加页面http的请求次数,增加了页面负担,我们用CSS3把样式都写在一个文件里面才是最佳的方法。

 

回归CSS3 Media

上面我们大概讲了下CSS2的媒体查询用法,现在我们重新回到CSS3的媒体查询,在第一段代码上面我用的是小于960px的尺寸的写法,那现在我们来实现等于960px尺寸的代码:

  1. @media screen and (max-device-width:960px){
  2.     body{
  3.         background:red;
  4.     }
  5. }

 

然后就是当浏览器尺寸大于960px时候的代码了:

  1. @media screen and (min-width:960px){
  2.     body{
  3.         background:orange;
  4.     }
  5. }

 

我们还可以混合使用上面的用法:

  1. @media screen and (min-width:960pxand (max-width:1200px){
  2.     body{
  3.         background:yellow;
  4.     }
  5. }

上面的这段代码的意思是当页面宽度大于960px小于1200px的时候执行下面的CSS。

 

Media所有参数汇总

以上就是我们最常需要用到的媒体查询器的三个特性,大于,等于,小于的写法。媒体查询器的全部功能肯定不止这三个功能,下面是我总结的它的一些参数用法解释:

  • width:浏览器可视宽度。

  • height:浏览器可视高度。

  • device-width:设备屏幕的宽度。

  • device-height:设备屏幕的高度。

  • orientation:检测设备目前处于横向还是纵向状态。

  • aspect-ratio:检测浏览器可视宽度和高度的比例。(例如:aspect-ratio:16/9)

  • device-aspect-ratio:检测设备的宽度和高度的比例。

  • color:检测颜色的位数。(例如:min-color:32就会检测设备是否拥有32位颜色)

  • color-index:检查设备颜色索引表中的颜色,他的值不能是负数。

  • monochrome:检测单色楨缓冲区域中的每个像素的位数。(这个太高级,估计咱很少会用的到)

  • resolution:检测屏幕或打印机的分辨率。(例如:min-resolution:300dpi或min-resolution:118dpcm)。

  • grid:检测输出的设备是网格的还是位图设备。




注意下顺序,如果你把@media (min-width: 768px)写在了下面那么很悲剧,

@media (min-width: 1200){ //>=1200的设备 }

@media (min-width: 992px){ //>=992的设备 }

@media (min-width: 768px){ //>=768的设备 }

因为如果是1440,由于1440>768那么你的1200就会失效。

所以我们用min-width时,小的放上面大的在下面,同理如果是用max-width那么就是大的在上面,小的在下面

@media (max-width: 1199){ //<=1199的设备 }

@media (max-width: 991px){ //<=991的设备 }

@media (max-width: 767px){ //<=768的设备 }


1280分辨率以上(大于1200px)

@media screen and (min-width:1200px){
    #page{ width: 1100px; }#content,.div1{width: 730px;}#secondary{width:310px}
}

 

1100分辨率(大于960px,小于1199px)

@media screen and (min-width: 960px) and (max-width: 1199px) {
    #page{ width: 960px; }#content,.div1{width: 650px;}#secondary{width:250px}select{max-width:200px}
}

 

880分辨率(大于768px,小于959px)

@media screen and (min-width: 768px) and (max-width: 959px) {
    #page{ width: 900px; }#content,.div1{width: 620px;}#secondary{width:220px}select{max-width:180px}
}

 

720分辨率(大于480px,小于767px)

@media only screen and (min-width: 480px) and (max-width: 767px){
    #page{ width: 450px; }#content,.div1{width: 420px;position: relative; }#secondary{display:none}#access{width: 450px; }#access a {padding-right:5px}#access a img{display:none}#rss{display:none}#branding #s{display:none}
}

 

440分辨率以下(小于479px)

@media only screen and (max-width: 479px) {
    #page{ width: 300px; }#content,.div1{width: 300px;}#secondary{display:none}#access{width: 330px;} #access a {padding-right:10px;padding-left:10px}#access a img{display:none}#rss{display:none}#branding #s{display:none}#access ul ul a{width:100px}
}

 

 

[css]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1.   
  2. @media screen and (orientation: portraitand (max-width720px对应样式  
  3.   
  4.   
  5. @media screen and (orientation: landscape对应样式  


 

上面的代码中用到了screen ,他的意思是在告知设备在打印页面时使用衬线字体,在屏幕上显示时用无衬线字体。但是目前我发现很多网站都会直接省略screen,因为你的网站可能不需要考虑用户去打印时。


  

PC端按屏幕宽度大小排序(主流的用橙色标明)

分辨率   比例 | 设备尺寸

1024*500 (8.9寸)
1024*768 (比例4:3  | 10.4寸、12.1寸、14.1寸、15寸; )
1280*800(16:10  |15.4寸)
1280*1024(比例:5:4  | 14.1寸、15.0寸)
1280*854(比例:15:10 | 15.2)
1366*768 (比例:16:9 | 不常见)
1440*900 (16:10  17寸 仅苹果用)
1440*1050(比例:5:4  | 14.1寸、15.0寸)
1600*1024(14:9  不常见)
1600*1200 (4:3 | 15、16.1)
1680*1050(16:10 | 15.4寸、20.0寸)
1920*1200 (23寸)

通过上面的电脑屏蔽及尺寸的例表上我们得到了几个宽度
1024  1280  1366  1440  1680  1920  

CSS代码

@media (min-width: 1024px){
  body{font-size: 18px}
}
@media (min-width: 1100px) {
  body{font-size: 20px}
}
@media (min-width: 1280px) {
  body{font-size: 22px;}

@media (min-width: 1366px) {
  body{font-size: 24px;}
}  
@media (min-width: 1440px) {
  body{font-size: 25px !important;}

@media (min-width: 1680px) {
  body{font-size: 28px;}

@media (min-width: 1920px) {
  body{font-size: 33px;}


<template> <div class="menu-list"> <h1 class="text-center">功能模块 <span class="user">您好:{{ currentUserName }}</span> <h1 class="time">{{nowTime}}</h1> <a href="login"><img src="../../public/images/用户.png" height="45" width="45" class="images"/></a></h1> <br/> <!-- 管理员界面按钮--> <div v-if="currentUserName === 'admin'" class="menu-items d-flex justify-content-around"> <el-button type="primary" @click="goToContentManageSystem">管理员</el-button> </div> <div class="menu-items d-flex justify-content-around"> <div class="menu-item col-md-2" @click="checkPermission('SCT001', 'CompMod')"> <img src="../../public/images/综合模块.png" height="50" width="50"/> 综合模块 </div> <div class="menu-item col-md-2" @click="checkPermission('SCT002', 'DesignMod')"> <img src="../../public/images/设计模块.png" height="50" width="50"/>   设计模块 </div> <div class="menu-item col-md-2" @click="checkPermission('SCT003', 'StorageMod')"> <img src="../../public/images/仓储模块.png" height="50" width="50"/>   仓储模块 </div> </div> <div class="menu-items d-flex justify-content-around"> <div class="menu-item col-md-2" @click="checkPermission('SCT004', 'FinanceMod')"> <img src="../../public/images/财务模块.png" height="50" width="50"/>   财务模块 </div> <div class="menu-item col-md-2" @click="checkPermission('SCT005', 'SupplyChainMod')"> <img src="../../public/images/供应链.png" height="50" width="50"/>   供应链模块 </div> <div class="menu-item col-md-2" @click="checkPermission('SCT006', 'ProduceMod')"> <img src="../../public/images/生产模块.png" height="50" width="50"/>   生产模块 </div> </div> <div class="menu-items d-flex justify-content-around"> <div class="menu-item col-md-2" @click="checkPermission('SCT007', 'PromotionMod')"> <img src="../../public/images/推广任务.png" height="50" width="50"/>   推广模块 </div> <div class="menu-item col-md-2" @click="checkPermission('SCT008', 'SystemMod')"> <img src="../../public/images/系统设置.png" height="50" width="50"/>   系统模块 </div> <div class="menu-item col-md-2" @click="checkPermission('SCT009', 'OperationMod')"> <img src="../../public/images/运营模块.png" height="50" width="50"/>   运营模块 </div> </div> <div class="menu-items d-flex justify-content-around"> <div class="menu-item col-md-2" @click="checkPermission('SCT010', 'KnowledgeMod')"> <img src="../../public/images/知识产权.png" height="50" width="50"/>   知识产权模块 </div> </div> </div> </template> <script> export default { name: "MenuList", data() { return { currentUserName: localStorage.getItem('currentUserName') || '', nowTime: "", }; }, methods: { async checkPermission(moduleCode, moduleName) { let URL = this.$httpBaseURL.Ip; try { let userName = this.currentUserName; let This = this; // 发起axios请求 const response = await axios.get(URL + 'api/checkPermission', { params: {userName, moduleCode} }); const data = response.data; if (Object.keys(data).length > 0) { // 如果返回的对象非空,表示有权限,跳转到对应的模块 this.$router.push({name: moduleName}); } else { // 如果返回的对象为空,表示无权限 This.$message({ message: "您没有权限访问该模块!", type: "error", duration: 1500, }); } } catch (error) { console.error('Error checking permission:', error); This.$message({ message: "检查权限时发生错误!", type: "error", duration: 1500, }); } }, goToContentManageSystem() { // 跳转到后台页面 this.$router.push('/ContentManageSystem'); }, getNowDate() { var date = new Date(); var sign2 = ":"; var year = date.getFullYear() // 年 var month = date.getMonth() + 1; // 月 var day = date.getDate(); // 日 var hour = date.getHours(); // 时 var minutes = date.getMinutes(); // 分 var seconds = date.getSeconds() //秒 var weekArr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']; var week = weekArr[date.getDay()]; // 给一位数的数据前面加 “0” month = month < 10 ? "0" + month : month; day = day < 10 ? "0" + day : day; hour = hour < 10 ? "0" + hour : hour; minutes = minutes < 10 ? "0" + minutes : minutes; seconds = seconds < 10 ? "0" + seconds : seconds; this.nowTime = week + " " + year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds; }, startTimer() { this.getNowDate(); setInterval(this.getNowDate, 500); } }, created() { this.startTimer(); } } </script> <style scoped> .menu-list { margin-top: 20px; } .menu-items { display: flex; flex-wrap: wrap; justify-content: space-around; margin-bottom: 50px; } .menu-item { border: 1px solid #f0f0f0; background-color: #ffffff; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); padding: 30px; margin: 10px; text-align: center; font-size: 16px; color: #000000; text-decoration: none; border-radius: 10px; width: 280px; } .menu-item:hover { background-color: #f0f0f0; } .images{ position: absolute; top: 48px; right: 288px; } .user{ position: absolute; top: 56px; right: 180px; font-size: 20px; } .time{ position: absolute; top: 66px; left: 178px; font-size: 20px; } </style> 帮我把这个页面改成响应式局媒体查询
09-06
<table id="t2" height="475px" style="width:92%;margin-top:0px; font-size: 14px;border-bottom: 0px;" border="1" bordercolor="#000"> <tr> <td width="1.5%" style="border:0;"></td> <td width="18%" align="left" style="border:0;padding-left:15px;" height="25px">检验项目</td> <td width="36%" align="left" style="border:0;padding-left:30px;">标准规定</td> <td width="26%" align="left" style="border:0;padding-left:25px;">检验结果</td> <td width="1.5%" style="border:0;"></td> </tr> <c:forEach items="${map.list }" var="subject" varStatus="status0"> <c:choose> <c:when test="${subject.lcs_jydl=='000'||subject.lcs_jydl=='/'}"> <tr> <td style="border:0;"></td> <td align="left" valign="top" class="td1" style="border:0;padding-left:13px;">    ${subject.lcs_jyxm }</td> <td align="left" valign="top" class="td1" style="border:0;padding-left:30px;word-break:break-all;">${subject.lcs_bzgd }</td> <td align="left" valign="top" class="td1" style="border:0;padding-left:25px;height:20px;">${subject.lcs_jyjg }<c:if test="${fn:contains(subject.lcs_jyjl ,'不') }">(不符合规定)</c:if></td> <td style="border:0;"></td> </tr> </c:when> <c:otherwise> <tr> <td style="border:0;"></td> <td align="left" class="td1" style="border:0;height:20px;padding-left:13px;">【${subject.lcs_jydl }】</td> <td align="left" class="td1" style="border:0;"></td> <td align="left" class="td1" style="border:0;"></td> <td style="border:0;"></td> </tr> <tr> <td style="border:0;"></td> <td align="left" class="td1" valign="top" style="border:0;padding-left:13px;">    ${subject.lcs_jyxm }</td> <td align="left" class="td1" valign="top" style="border:0;padding-left:30px;word-break:break-all;">${subject.lcs_bzgd }</td> <td align="left" class="td1" valign="top" style="border:0;padding-left:25px;height:20px;">${subject.lcs_jyjg } <c:if test="${fn:contains(subject.lcs_jyjl ,'不') }">(不符合规定)</c:if> </td> <td style="border:0;"></td> </tr> </c:otherwise> </c:choose> </c:forEach> <tr> <td align="center" valign="top" style="border-bottom: 0px;border-bottom: 0px;border:0;" colspan=5>---------以下空白---------</td> </tr> </table>上述代码打印数据过多进行分页第二页保留头部
最新发布
12-05
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>唯美 </title> <meta name="keywords" content=" "> <meta name="description" content=" "> <meta name="author" content="www."> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> <link rel="shortcut icon" href="index/images/favicon.ico"> <link rel="stylesheet" href="css/jquery.fancybox-1.3.4.css" type="text/css" media="screen"> <link rel="stylesheet" href="css/style.css" type="text/css" media="all"> <link href="css/prettyPhoto.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery.min.js" ></script> <script type="text/javascript" src="js/content_switch.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.mousewheel.js"></script> <script type="text/javascript" src="js/jquery-ui.js"></script> <script type="text/javascript" src="js/cScroll.js"></script> <script src="js/jquery.cycle.all.latest.js" type="text/javascript"></script> <script src="js/jquery.color.js" type="text/javascript"></script> <script type="text/javascript" src="js/script.js"></script> <script type="text/javascript" src="js/functions.js"></script> <script src="js/prettyPhoto.js"></script> <!--[if lt IE 9]> <script type="text/javascript" src="./js/html5.js"></script> <link rel="stylesheet" href="./css/ie.css" type="text/css" media="all"> <![endif]--> <!--[if lt IE 8]> <div style=' clear: both; text-align:center; position: relative;'> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></a> </div> <![endif]--> <body onpaste="return false" ondragstart="return false" onmouseover="window.status='';return true" oncopy="return false;"> <frameset> <frame src="index.html"> </frameset> <script> function stop(){ alert('宝贝,我爱你!'); return false; } document.oncontextmenu=stop; </script> <body onselectstart="return false" onpaste="return false" oncopy="return false;" oncut="return false;" > <script> function checkhtml5() { if ($.browser.msie && parseInt($.browser.version, 10) < 9) { document.body.innerHTML="<div style=' clear: both; text-align:center; position: relative; height: 50px; margin-top: 30px; padding: 20px; background-color: red; color: white; font-size:20px;'>你的浏览器非常落后,不支持 HTML5!<br/>请使用 Chrome 14+/IE 9+/Firefox 7+/Safari 4+ 其中任意一款浏览器访问此页面。</a></div>"; } } </script> <head> <style> a.wb_sina { float:left; margin-top:20px; margin-left:15px; display:inline-block; padding:4px 10px; border-radius:3px; background-color:#e55345; background-image:-moz-linear-gradient(top,#e96249,#e03c40); background-image:-ms-linear-gradient(top,#e96249,#e03c40); background-image:-webkit-gradient(linear,0 0,0 100%,from(#e96249),to(#e03c40)); background-image:-webkit-linear-gradient(top,#e96249,#e03c40); background-image:-o-linear-gradient(top,#e96249,#e03c40); background-image:linear-gradient(top,#e96249,#e03c40); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e96249',endColorstr='#e03c40',GradientType=0); background-repeat:repeat-x; text-shadow:0 -1px 0 rgba(0,0,0,.5); border:1px solid #cf2b28; color:#fff!important; box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 1px 0 rgba(0,0,0,.2); } a.wb_sina:hover { background-image:-moz-linear-gradient(top,#e03c40,#e96249); background-image:-ms-linear-gradient(top,#e03c40,#e96249); background-image:-webkit-gradient(linear,0 0,0 100%,from(#e03c40),to(#e96249)); background-image:-webkit-linear-gradient(top,#e03c40,#e96249); background-image:-o-linear-gradient(top,#e03c40,#e96249); background-image:linear-gradient(top,#e03c40,#e96249); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e03c40',endColorstr='#e96249',GradientType=0); } a.wb_sina span { display:inline-block; vertical-align:-5px; margin-right:7px; height:20px; width:24px; background:url(./images/weibo.png) no-repeat; } a.wb_tencent { float:left; margin-top:20px; margin-left:15px; display:inline-block; padding:4px 10px; border-radius:3px; background-color:#0e7fcc; background-image:-moz-linear-gradient(top,#1288d4,#0771c1); background-image:-ms-linear-gradient(top,#1288d4,#0771c1); background-image:-webkit-gradient(linear,0 0,0 100%,from(#1288d4),to(#0771c1)); background-image:-webkit-linear-gradient(top,#1288d4,#0771c1); background-image:-o-linear-gradient(top,#1288d4,#0771c1); background-image:linear-gradient(top,#1288d4,#0771c1); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1288d4',endColorstr='#0771c1',GradientType=0); background-repeat:repeat-x; text-shadow:0 -1px 0 rgba(0,0,0,.5); border:1px solid #0D6EB8; color:#fff!important; box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 1px 0 rgba(0,0,0,.2); } a.wb_tencent:hover { background-color:#0e7fcc; background-image:-moz-linear-gradient(top,#0771c1,#1288d4); background-image:-ms-linear-gradient(top,#0771c1,#1288d4); background-image:-webkit-gradient(linear,0 0,0 100%,from(#0771c1),to(#1288d4)); background-image:-webkit-linear-gradient(top,#0771c1,#1288d4); background-image:-o-linear-gradient(top,#0771c1,#1288d4); background-image:linear-gradient(top,#0771c1,#1288d4); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0771c1',endColorstr='#1288d4',GradientType=0); } a.wb_tencent span { display:inline-block; vertical-align:-5px; margin-right:7px; height:20px; width:24px; background:url(./images/weibo.png) no-repeat 0 -20px; } #abox { position: fixed; _position: absolute; right: 15px; z-index: 99999999; } </style> </head> <body> <body onLoad="checkhtml5()"> <div id="abox"> </div> <div class="page_spinner"> <div></div> </div> <div class="over"> <div class="centre"> <div class="main"> <!--header --> <header> <h1><span id="logo"><img src="images/logo1.png" alt="" usemap="#logo"></span></h1> <nav class="menu"> <ul id="menu"> <li id="nav1"><img src="images/nav1.png" alt=""><span>爱的宣誓</span></li> <li id="nav2"><img src="images/nav2.png" alt=""><span>恋爱历程</span> </li> <li id="nav3"><img src="images/nav3.png" alt=""><span>絮叨絮叨</span></li> <li id="nav4"><img src="images/nav4.png" alt=""><span>祝福我们</span></li> <li id="nav5"><img src="images/nav5.png" alt=""><span>爱的映像</span></li> <li id="nav6"><img src="images/nav6.png" alt=""><span>时光沙漏</span></li> </ul> </nav> <img src="images/spacer.gif" alt="" id="navigation" usemap="#navigation"> <map name="navigation" class="navigation"> </map> <map name="logo" class="map_logo"></map> </header> <!--header end--> <!--content --> <map name="back" class="map_back"></map> <article id="content"> <ul> <li id="page_Home"> <img src="images/bg_content.png" alt="" class="bg_cont"> <span class="back"><img src="images/nav1.png" alt="" usemap="#back"><a href="index.html#close">返回</a></span> <div class="pad"> <h2>爱的宣誓</h2> 人物:浟佳 & 宝贝<br /> 不在乎曾经拥有,只在乎天长地久。<br /> 爱,就要说出来!<br /> 再美好的回忆,也只是回忆;<br /> 再美丽的诺言,不到实现的那一刻,也只是一句空话。<br/> -- </div> </li> <li id="page_About"> <img src="images/bg_content.png" alt="" class="bg_cont"> <span class="back"><img src="images/nav2.png" alt="" usemap="#back"><a href="index.html#close">返回</a></span> <div class="pad"> <h2>恋爱历程</h2> <div class="relative"> <div class="scroll"> <span>人物:浟佳 & 宝贝</span> <p>    宝贝你还记得么?</p> <p>    XX年X月X日。</p> <p>    我们在xx相遇。</p> <p>    然后.........</p> <p>    过程.........</p> <p>    我爱你,我会一直陪在你身边</p> <p>    不离不弃</p> <p>     - </p> </div> </div> </div> </li> <li id="page_Talk"> <img src="images/bg_content.png" alt="" class="bg_cont"> <span class="back"><img src="images/nav3.png" alt="" usemap="#back"><a href="index.html#close">返回</a></span> <div class="pad"> <h2>絮叨絮叨</h2> <div class="relative"> <div class="scroll"> <div style="width:100%;float: left; border-bottom: 1px solid #CCCCCC;">浟佳<br/><span style="float: right"> --by </span></div> <div style="width:100%;float: left">分享我所知道的<br/><span style="float: right"> --by </span></div> </div> </div> </div> </li> <li id="page_Message"> <img src="images/bg_content.png" alt="" class="bg_cont"> <span class="back"><img src="images/nav4.png" alt="" usemap="#back"><a href="index.html#close">返回</a></span> <div class="pad"> <h2>祝福我们</h2> <div class="relative"> <div class="scroll"> <div style="min-height: 300px; padding-bottom: 50px;"> <!-- 多说评论框 start --> <div class="ds-thread" data-thread-key="yyu" data-title="bb" data-url="http://"></div> <!-- 多说评论框 end --> <!-- 多说公共JS代码 start (一个网页只需插入一次) --> <script type="text/javascript"> var duoshuoQuery = {short_name:"love90"}; (function() { var ds = document.createElement('script'); ds.type = 'text/javascript';ds.async = true; ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '/static.duoshuo.com/embed.js'; ds.charset = 'UTF-8'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds); })(); </script> <!-- 多说公共JS代码 end --> </div> </div> </div> </div> </li> <li id="page_Blog"> <img src="images/bg_content.png" alt="" class="bg_cont"> <span class="back"><img src="images/nav5.png" alt="" usemap="#back"><a href="index.html#close">返回</a></span> <div class="pad"> <h2>爱的映像</h2> <div class="relative"> <div class="scroll"> <ul class="gallery fancybox"> <li style="line-height:120px"><a href="images/uploadimage/imglsh001.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/imglsh001small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/imglsh002.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/imglsh002small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/img003.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/img003small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/imglsh001.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/imglsh001small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/imglsh002.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/imglsh002small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/img003.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/img003small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/img004.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/img004small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/imglsh002.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/imglsh002small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/img003.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/img003small.jpg" alt=""></a></li> <li style="line-height:120px"><a href="images/uploadimage/img004.jpg" rel="prettyPhoto[gallery1]"><img src="images/uploadimage/img004small.jpg" alt=""></a></li> </ul> </div> </div> </div> </li> <li id="page_Time"> <img src="images/bg_content.png" alt="" class="bg_cont"> <span class="back"><img src="images/nav6.png" alt="" usemap="#back"><a href="index.html#close">返回</a></span> <div class="pad"> <h2>时光沙漏</h2> <div id="loveHeart" style="margin-top: 30px;font-size: 25px;"> <span style="">宝贝你知道我爱你爱了多久了吗?</span> <div id="elapseClock" style="margin: 10px 0px 10px 0px;"></div> <img src="images/1.gif" />    <img src="images/2.gif" /><br/><br/> <div id="loveu"> 爱:从2014-2-6开始!<br/> <div class="signature" style="float: right; margin-right: 50px;">by 浟佳 </div> </div> </div> </div> </li> </ul> </article> <!--content end--> </div> </div> <div class="bg1"> <div class="main"> <!--footer --> <footer style="line-height:20px"> <div id="copyright"> <script language="JavaScript"></script> </div> <!-- {%FOOTER_LINK} --> </footer> <!--footer end--> </div> </div> </div> <script> $(window).load(function() { $('.page_spinner').fadeOut(); $('body').css({overflow:'visible'}); }) </script> <script type="text/javascript">//修改时光沙漏时间 var offsetX = $("#loveHeart").width() / 2; var offsetY = $("#loveHeart").height() / 2 - 55; var together = new Date(); together.setFullYear(2014, 02, 06); together.setHours(17); together.setMinutes(0); together.setSeconds(0); together.setMilliseconds(0); setTimeout(function () { adjustWordsPosition(); startHeartAnimation(); }, 3000); timeElapse(together); setInterval(function () { timeElapse(together); }, 500); adjustCodePosition(); $("#code").typewriter(); </script> <audio id="bgmMusic" src="http://www.51mp3ring.com/51mp3ring_com2/at200611121582079026.mp3" preload="auto" type="audio/mp3" autoplay loop></audio> <!--coded by koma--> <!--LIVEDEMO_00 --> </body> </head> </html>补充并修改该代码
05-21
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值