clear:both 的使用

本文详细解释了如何使用CSS中的clear:both属性来清除浮动的影响,确保页面主体部分(包括侧边栏和主体内容)在设置宽度时不会出现错位。同时介绍了overflow:hidden属性用于控制内容过长时的显示方式,避免布局被撑开。

clear:both,表示清除左、右所有的浮动,在接下来的布局中我们还会用这个属性:clear:left/right。在这里添加clear:both是由于之前的ul、li元素设置了浮动,如果不清除则会影响banner层位置的设定。

<div id="pagebody"><!--页面主体-->
<div id="sidebar"><!--侧边栏-->
</div>
<div id="mainbody"><!--主体内容-->
</div>
</div>

以上是页面主体部分,我们在css.css中添加以下样式:

#pagebody {

width:730px;
margin:8px auto;
}
#sidebar {
width:160px;
text-align:left;
float:left;
clear:left;
overflow:hidden;
}
#mainbody {
width:570px;
text-align:left;
float:right;
clear:right;
overflow:hidden
}

为了可以查看到效果,建议在#sidebar和#mainbody中加入以下代码,预览完成后可以删除这段代码:

border:1px solid #E00;
height:200px

保存预览效果,可以发现这两个层完美的浮动,在达到了我们布局的要求,而两个层的实际宽度应该160+2(border)+570+2=734px,已经超出了父层的宽度,由于clear的原因,这两个层才不会出现错位的情况,这样可以使我们布局的页面不会因为内容太长(例如图片)而导致错位。

Image

而之后添加的overflow:hidden则可以使内容太长(例如图片)的部份自动被隐藏。通常我们会看到一些网页在载入时,由于图片太大,导致布局被撑开,直到页面下载完成才恢复正常,通过添加overflow:hidden就可以解决这个问题。

C:\Users\Administrator>curl -vk https://127.0.0.1 * Trying 127.0.0.1:443... * Connected to 127.0.0.1 (127.0.0.1) port 443 * schannel: disabled automatic use of client certificate * schannel: using IP address, SNI is not supported by OS. * ALPN: curl offers http/1.1 * ALPN: server accepted http/1.1 * using HTTP/1.x > GET / HTTP/1.1 > Host: 127.0.0.1 > User-Agent: curl/8.9.1 > Accept: */* > * schannel: remote party requests renegotiation * schannel: renegotiating SSL/TLS connection * schannel: SSL/TLS connection renegotiated < HTTP/1.1 403 Forbidden < Cache-Control: private < Content-Type: text/html; charset=utf-8 < Server: Microsoft-IIS/10.0 < Date: Wed, 16 Jul 2025 07:23:50 GMT < Content-Length: 4934 < <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>IIS 10.0 详细错误 - 403.14 - Forbidden</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;} code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} .config_source code{font-size:.8em;color:#000000;} pre{margin:0;font-size:1.4em;word-wrap:break-word;} ul,ol{margin:10px 0 10px 5px;} ul.first,ol.first{margin-top:5px;} fieldset{padding:0 15px 10px 15px;word-break:break-all;} .summary-container fieldset{padding-bottom:5px;margin-top:4px;} legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px; font-weight:bold;font-size:1em;} a:link,a:visited{color:#007EFF;font-weight:bold;} a:hover{text-decoration:none;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em;margin:0;color:#CC0000;} h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;} h4{font-size:1.2em;margin:10px 0 5px 0; }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif; color:#FFF;background-color:#5C87B2; }#content{margin:0 0 0 2%;position:relative;} .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;} .content-container p{margin:0 0 10px 0; }#details-left{width:35%;float:left;margin-right:2%; }#details-right{width:63%;float:left;overflow:hidden; }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF; background-color:#5A7FA5;border-bottom:1px solid #C1CFDD;border-top:1px solid #4A6C8E;font-weight:normal; font-size:1em;color:#FFF;text-align:right; }#server_version p{margin:5px 0;} table{margin:4px 0 4px 0;width:100%;border:none;} td,th{vertical-align:top;padding:3px 0;text-align:left;font-weight:normal;border:none;} th{width:30%;text-align:right;padding-right:2%;font-weight:bold;} thead th{background-color:#ebebeb;width:25%; }#details-right th{width:20%;} table tr.alt td,table tr.alt th{} .highlight-code{color:#CC0000;font-weight:bold;font-style:italic;} .clear{clear:both;} .preferred{padding:0 5px 2px 5px;font-weight:normal;background:#006633;color:#FFF;font-size:.8em;} --> </style> </head> <body> <div id="content"> <div class="content-container"> <h3>HTTP 错误 403.14 - Forbidden</h3> <h4>Web 服务器被配置为不列出此目录的内容。</h4> </div> <div class="content-container"> <fieldset><h4>最可能的原因:</h4> <ul> <li>没有为请求的 URL 配置默认文档,并且没有在服务器上启用目录浏览。</li> </ul> </fieldset> </div> <div class="content-container"> <fieldset><h4>可尝试的操作:</h4> <ul> <li>如果不希望启用目录浏览,请确保配置了默认文档并且该文件存在。</li> <li> 使用 IIS 管理器启用目录浏览。 <ol> <li>打开 IIS 管理器。</li> <li>在“功能”视图中,双击“目录浏览”。</li> <li>在“目录浏览”页上,在“操作”窗格中单击“启用”。</li> </ol> </li> <li>确认站点或应用程序配置文件中的 configuration/system.webServer/directoryBrowse@enabled 特性被设置为 True。</li> </ul> </fieldset> </div> <div class="content-container"> <fieldset><h4>详细错误信息:</h4> <div id="details-left"> <table border="0" cellpadding="0" cellspacing="0"> <tr class="alt"><th>模块</th><td>   DirectoryListingModule</td></tr> <tr><th>通知</th><td>   ExecuteRequestHandler</td></tr> <tr class="alt"><th>处理程序</th><td>   StaticFile</td></tr> <tr><th>错误代码</th><td>   0x00000000</td></tr> </table> </div> <div id="details-right"> <table border="0" cellpadding="0" cellspacing="0"> <tr class="alt"><th>请求的 URL</th><td>   https://127.0.0.1:443/</td></tr> <tr><th>物理路径</th><td>   C:\Updates</td></tr> <tr class="alt"><th>登录方法</th><td>   匿名</td></tr> <tr><th>登录用户</th><td>   匿名</td></tr> </table> <div class="clear"></div> </div> </fieldset> </div> <div class="content-container"> <fieldset><h4>详细信息:</h4> 当没有在 URL 中指定文档,没有为网站或应用程序指定默认文档,或者没有为网站或应用程序启用目录列表时,便会出现此错误。此 设置可能是有意禁用的,以保护服务器内容的安全。 <p><a href="https://go.microsoft.com/fwlink/?LinkID=62293&IIS70Error=403,14,0x00000000,20348">查看详细信息 »</a></p> </fieldset> </div> </div> </body> </html> * Connection #0 to host 127.0.0.1 left intact 这是正常的吗
07-17
<template> <div class="certificate"> <el-card class="mb-[10px] h-[100%]"> <template #header>{{ headerTitle }} <span v-if="list.lenth > queryParams.pageSize"> <Icon class="float-right cursor-pointer mt-[2px]" icon="ep:refresh" />换一批 </span> </template> <div class="list-box"> <div class="item" v-for="(item, index) in list" :key="index"> <div class=""> <span>{{ item.sort }}、  </span> <span v-if="item.name">{{ item.name }} </span> <span v-if="item.level">{{ item.level }} </span> <span v-if="item.major">{{ item.major }} </span> <span v-if="item.threeCategory">{{ item.threeCategory }} </span> <span v-if="item.socialSecurity">{{ item.socialSecurity }} </span> <span v-if="item.dealPrice">成本{{ item.dealPrice }}</span> <span v-if="item.cost">成交价{{ item.cost }}</span> </div> <div class="operation"> <el-button type="primary" plain size="small">领取</el-button> <el-button type="success" plain size="small">查阅</el-button> </div> </div> </div> </el-card> </div> </template> <script setup> import { ref, watch, onMounted } from "vue"; import { TalentLeadApi } from '@/api/crm/talentlead' import { propTypes } from '@/utils/propTypes' const props = defineProps({ title: propTypes.string.def('待匹配企业'), type: propTypes.number.def(NaN), }); const loading = ref(false) const headerTitle = props.title; const queryParams = reactive({ pageNo: 1, pageSize: 10, type: 0, status: 'PENDING_RECEIVE', sceneType: 1 }) const total = ref(0) const list = ref([]); /** 查询列表 */ const getList = async () => { loading.value = true const { type } = props queryParams.type = type try { if (type === 0) { const data = await TalentLeadApi.getTalentLeadPage(queryParams) list.value = data.list.map((item, index) => { item.sort = index + 1 return { ...item } }); } else if (type === 1) { // data = await TalentLeadApi.getTalentLeadPage(queryParams) } total.value = data.total } finally { loading.value = false } } /** * 点击换一批 */ const changePage = () => { const { pageNo, pageSize } = queryParams if (pageNo * pageSize < total.value) { queryParams.pageNo++ } else { queryParams.pageNo = 1 } getList(); } /** 初始化 **/ onMounted(() => { getList(); }); </script> <style lang="scss" scoped> .certificate { width: 100%; .item { line-height: 50px; font-size: 14px; display: flex; justify-content: space-between; border-bottom: 1px solid rgb(224, 224, 224); .info { width: 100%; } .operation { width: 120px; display: none; } &:hover .info { width: calc(100% - 120px); } &:hover .operation { display: block; } &:last-child { border-bottom: 0; } } } </style> 样式优化
最新发布
07-18
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>云顶之弈</title> <style> .title{ font-size: 22px; font-weight: bold; color: #0da0b4; display: flex; justify-content: center; align-items: center; } li{ display: block; border-top: 1px #bdbdbd solid; height: 40px; font-size: 14px; } a{ text-decoration: none; color: black; } .new1{ border: 1px solid; color:#0da0b4; } .video{ border: 1px solid; color: #c5ab86; } .bulletin,.new2{ border: 1px solid; color:#e9852d; } .num1:hover{ color: #0da0b4; } .num2:hover{ color:#c5ab86; } .num3:hover{ color: #e9852d; } .day{ } </style> </head> <body> <a href="#" class="title">【云顶之弈】特别报道动画短片</a> <ul> <li> <span class="new1"> 新闻 </span>   <a href="#" class="num1">【抖音】斗魂竞技场主播积分赛咨询</a> <span class="day"> 03-21 </span> </li> <li> <span class="new1"> 新闻 </span>   <a href="#" class="num1">【云顶之弈】气象主播小小迦娜大礼包续预售公告及帮...</a> <span class="day"> 03-21 </span> </li> <li> <span class="new2"> 新闻 </span>   <a href="#" class="num2">诺克萨斯主题季小游戏:恶魔手契</a> <span class="day"> 03-21 </span> </li> <li> <span class="video"> 视频 </span>   <a href="#" class="num3">Ma Meilleure Ennemie 英雄联盟双城之战动画第二季...</a> <span class="day"> 03-21 </span> </li> <li> <span class="bulletin"> 公告 </span>   <a href="#" class="num2">商店更新--神话商城和蓝色精萃商店</a> <span class="day"> 03-20 </span> </li> <li> <span class="bulletin"> 公告 </span>   <a href="#" class="num2">幽梦玫瑰的纯洁花蕾活动上线</a> <span class="day"> 03-20 </span> </li> </ul> </body> </html>如何将day词条靠右
03-25
<!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
以下源码的用户和密码分别是:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN"> <head> <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=GBK"> <title>安邦系统平台入口-登录验证</title> <style> *{margin:0px;padding:0px;} html,body{margin:0px; padding:0px;height:100%;width:100%;border:0px;} body{background:#6c6c6c;height:100%;width:100%;overflow:hidden;} .LoginDIV{width:700px;margin:0px auto;;padding:0px;overflow:hidden;} .FootDIV {width:700px;margin:0px auto;;padding:0px;overflow:hidden;text-align:center;} .TextInput{padding:3px 0px 3px 5px;width:100px;border-left:solid 1px #444444;border-top:solid 1px #444444;border-right:solid 1px #ffffff;;border-bottom:solid 1px #ffffff;font-size:13px;text-align:center;} </style> <script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script> <script language='JavaScript'> function getObjByID(Id){if('object'==typeof(Id))return Id;else if('string'==typeof(Id))return document.getElementById(Id);else return null;} function SetCookie(inc_Name,INC_Value,INC_Hours) {   var TheEXP = new Date();   TheEXP.setTime(TheEXP.getTime() + 60*60*1000*INC_Hours);   document.cookie= inc_Name + "=" + INC_Value + ";expires="+ TheEXP.toGMTString(); } function GetCookie(inc_Name) {   var cookieString = new String(document.cookie);   var cookieHeader = inc_Name + "=";   var beginPosition = cookieString.indexOf(cookieHeader);   if (beginPosition != -1) { cookieString=cookieString.substring(beginPosition + cookieHeader.length); beginPosition=cookieString.indexOf(";") if (beginPosition != -1){cookieString=cookieString.substring(0,beginPosition);} return cookieString; }   else {return "";} } function GetAllCookie() { var CookieUserName=GetCookie('CKUserName'); var CookieUserPass=GetCookie('CKUserPass'); var CookieKeepMyInfo=GetCookie('CKKeepMyInfo'); document.getElementById('UserName').value=CookieUserName; document.getElementById('UserPass').value=CookieUserPass; if (CookieKeepMyInfo.replace(/\s*/,'')=='1') {document.getElementById('KeepMyInfo').value==1;} else {document.getElementById('KeepMyInfo').value==0;} } function CheckForm(inc_form) { var FOBJ=document.getElementById(inc_form); var UserName=FOBJ.UserName.value.replace(/\s*/g,''); var UserPass=FOBJ.UserPass.value.replace(/\s*/g,''); if (UserName==''){alert('请输入帐号');FOBJ.UserName.value='';FOBJ.UserName.focus();return false;} if (UserPass==''){alert('请输入密码');FOBJ.UserPass.value='';FOBJ.UserPass.focus();return false;} if (UserPass==''){alert('请输入密码');FOBJ.UserPass.value='';FOBJ.UserPass.focus();return false;} if (document.getElementById('KeepMyInfo').value==1) { SetCookie("CKUserName",UserName,48); SetCookie("CKUserPass",UserPass,48); SetCookie("CKKeepMyInfo",1,48); } else { SetCookie("CKUserName","",48); SetCookie("CKUserPass","",48); SetCookie("CKKeepMyInfo",0,48); } return true; } function CheckKeydown(inc_event,inc_NextOBJ,inc_FS) { if (inc_event.keyCode==13) { if (inc_FS==0) {document.getElementById(inc_NextOBJ).focus();} else { if(CheckForm(inc_NextOBJ)){document.getElementById(inc_NextOBJ).submit();} } } } function resizeWindow() { var BodyHeight=0; var TopDIVHeight=0; var LoginDIVHeight=0; var IMGLaoYingHeight=0; var IMGLaoYingWidth=0; BodyHeight=$("body").height(); LoginDIVHeight=$("#LoginDIV").height(); IMGLaoYingHeight=$("#IMGLaoYing").height(); TopDIVHeight=BodyHeight-LoginDIVHeight; var IMGMarginTop= (TopDIVHeight-IMGLaoYingHeight)/2.5 + 'px'; $("#TopDIV").height(TopDIVHeight); $("#IMGLaoYing").css("margin-top",IMGMarginTop); } $(document).ready(function(){resizeWindow();}); $(window).resize(function() {resizeWindow();}); </script> </head> <body onload="GetAllCookie();document.getElementById('UserName').focus();"> <div id="TopDIV" style="overflow:hidden;text-align:center;background:#000000;margin:0px auto;width:100%;background:#000000;height:70%"> <img id='IMGLaoYing' src="/images/laoying.png" style="height:55%;max-width:650px;"> </div> <div id="LoginDIV" style="overflow:hidden;text-align:center;background:#000000;margin:0px auto;width:100%;background:#c07814;height:200px"> <div style="overflow:hidden;height:50px;"> </div> <div style="overflow:hidden;margin:0px auto;width:500px;text-align:center;border:solid 0px #000000"> <form method='post' id='LogForm' name='LogForm' action='CheckPWD.php' style='margin:0px;padding:0px;overflow:hidden;'> <div style="overflow:hidden;float:left;margin-left:5px;"></div> <div style="overflow:hidden;float:left;font-size:13px;padding-top:3px;color:#222222;font-weight:bold;font-family:'Microsoft YaHei' ! important;">用  户:</div> <div style="overflow:hidden;float:left;margin-left:5px;"><Input Type="Text" class="TextInput" name="UserName" id="UserName" value="" maxlength="30" onkeydown="CheckKeydown(event,'UserPass',0);"></div> <div style="overflow:hidden;float:left;width:60px;"> </div> <div style="overflow:hidden;float:left;font-size:13px;padding-top:3px;color:#222222;font-weight:bold;font-family:'Microsoft YaHei' ! important;">密  码:</div> <div style="overflow:hidden;float:left;margin-left:5px;"><Input Type="password" class="TextInput" name="UserPass" id="UserPass" value="" maxlength="30" onkeydown="CheckKeydown(event,'LogForm',1);"></div> <div style="overflow:hidden;float:left;width:55px;"> </div> <div style="overflow:hidden;float:left;"> <Input Type="button" value=" 确 认 " onclick="if(CheckForm('LogForm')){LogForm.submit();}" style="width:80px;height:25px;background:#900a12;border:solid 0px #ffffff;font-size:13px;color:#ffffff;font-weight:bold;font-family:'Microsoft YaHei' ! important;"> <input type="hidden" id="KeepMyInfo" name="KeepMyInfo" value="1"> </div> </form> </div> <div style="clear:both;overflow:hidden;height:50px;"></div> <div style="overflow:hidden;text-align:center;font-size:12px;color:#333333">安邦咨询(ANBOUND)内部管理系统,&copy 2025</div> </div> </body> </html>
05-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值