Team:ZJU-China/sandbox
From 2013.igem.org
(2 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
+ | <!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"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | <head> | ||
Line 168: | Line 169: | ||
} | } | ||
button#showLeftPush:hover { | button#showLeftPush:hover { | ||
- | background-color: | + | background-color: #09F; |
- | background-color: # | + | } |
+ | button#showRightPush { | ||
+ | border: none; | ||
+ | display: block; | ||
+ | width: 60px; | ||
+ | height: 60px; | ||
+ | background-image:url(images/edit_icon.png); | ||
+ | cursor: pointer; | ||
+ | position: absolute; | ||
+ | margin-left: 280px; | ||
+ | background-color: #102B66; | ||
+ | } | ||
+ | button#showRightPush:hover { | ||
background-color: #09F; | background-color: #09F; | ||
} | } | ||
Line 176: | Line 189: | ||
width: 100%; | width: 100%; | ||
height: 60px; | height: 60px; | ||
+ | position: absolute; | ||
+ | top: 0px; | ||
} | } | ||
#main-image { | #main-image { | ||
Line 228: | Line 243: | ||
overflow: visible; | overflow: visible; | ||
height: 100%; | height: 100%; | ||
+ | line-height: normal; | ||
+ | } | ||
+ | ul { | ||
+ | line-height: normal; | ||
} | } | ||
#bodyContent { | #bodyContent { | ||
Line 347: | Line 366: | ||
} | } | ||
p:first-child { | p:first-child { | ||
- | display: | + | display: inline; |
} | } | ||
#catlinks { | #catlinks { | ||
Line 358: | Line 377: | ||
</style> | </style> | ||
- | <link href="https://2013.igem.org/Team:ZJU-China/css/js-menu.css?action=raw&ctype=text/css" rel="stylesheet" type="text/css" /> | + | <link href="https://2013.igem.org/Team:ZJU-China/css/js-menu.css?action=raw&ctype=text/css" rel="stylesheet" type="text/css" /> |
- | <link href="https://2013.igem.org/Team:ZJU-China/css/js-slider.css?action=raw&ctype=text/css" rel="stylesheet" type="text/css" /> | + | <link href="https://2013.igem.org/Team:ZJU-China/css/js-slider.css?action=raw&ctype=text/css" rel="stylesheet" type="text/css" /> |
- | <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:ZJU-China/css/spmenu_component.css?action=raw&ctype=text/css" /> | + | <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:ZJU-China/css/spmenu_component.css?action=raw&ctype=text/css" /> |
- | <script type="text/javascript" src="https://2013.igem.org/Team:ZJU-China/js/modernizr.custom.js?action=raw&ctype=text/javascript"></script> | + | <script type="text/javascript" src="https://2013.igem.org/Team:ZJU-China/js/modernizr.custom.js?action=raw&ctype=text/javascript"></script> |
- | <script type="text/javascript" src="https://2013.igem.org/Team:ZJU-China/js/classie.js?action=raw&ctype=text/javascript"></script> | + | <script type="text/javascript" src="https://2013.igem.org/Team:ZJU-China/js/classie.js?action=raw&ctype=text/javascript"></script> |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | ||
- | <script type="text/javascript" src="https://2013.igem.org/Team:ZJU-China/js/jquery.easing.1.3.js?action=raw&ctype=text/javascript"></script> | + | <script type="text/javascript" src="https://2013.igem.org/Team:ZJU-China/js/jquery.easing.1.3.js?action=raw&ctype=text/javascript"></script> |
<script type="text/javascript"> | <script type="text/javascript"> | ||
$(function() { | $(function() { | ||
Line 499: | Line 518: | ||
<div id="header-nav-wrapper"> | <div id="header-nav-wrapper"> | ||
<button id="showLeftPush" title="ZJU-China History"></button> | <button id="showLeftPush" title="ZJU-China History"></button> | ||
+ | <button id="showRightPush" title="User Editing Menu"></button> | ||
<div id="logo-wrapper"> | <div id="logo-wrapper"> | ||
<img src="images/ZJU_logo_header.png" alt="" name="logo" width="200" height="60" id="logo" /> | <img src="images/ZJU_logo_header.png" alt="" name="logo" width="200" height="60" id="logo" /> | ||
Line 657: | Line 677: | ||
<h1>说明</h1> | <h1>说明</h1> | ||
<p>顶部颜色:#102B66</p> | <p>顶部颜色:#102B66</p> | ||
- | <p>底部颜色:#01164B</p> | + | <p>底部颜色:#01164B</p> |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
<h2>清除方法</h2> | <h2>清除方法</h2> | ||
<p>由于所有列都是浮动的,因此,此布局在 .footer 规则中采用 clear:both 声明。此清除方法强制使 .container 了解列的结束位置,以便显示在 .container 中放置的任何边框或背景颜色。如果您的设计要求您从 .container 中删除 .footer,则需要采用其它清除方法。最可靠的方法是在最后一个浮动列之后(但在 .container 结束之前)添加 <br class="clearfloat" /> or <div class="clearfloat"></div>。这具有相同的清除效果。</p> | <p>由于所有列都是浮动的,因此,此布局在 .footer 规则中采用 clear:both 声明。此清除方法强制使 .container 了解列的结束位置,以便显示在 .container 中放置的任何边框或背景颜色。如果您的设计要求您从 .container 中删除 .footer,则需要采用其它清除方法。最可靠的方法是在最后一个浮动列之后(但在 .container 结束之前)添加 <br class="clearfloat" /> or <div class="clearfloat"></div>。这具有相同的清除效果。</p> | ||
Line 702: | Line 690: | ||
<!-- end .container --></div> | <!-- end .container --></div> | ||
<div class="footer"> | <div class="footer"> | ||
- | <img src="images/ZJU-logo.png" width="235" height="68" alt="The logo of Zhejiang University" longdesc="http://www.zju.edu.cn/" /> <!-- end .footer --></div> | + | <img src="images/ZJU-logo.png" width="235" height="68" alt="The logo of Zhejiang University" longdesc="http://www.zju.edu.cn/" /> |
+ | <!-- end .footer --> | ||
+ | </div> | ||
+ | <!-- some javascript that need to load later --> | ||
+ | <script> | ||
+ | // move edit link to the push menu | ||
+ | while ($("#menubar ul li:first").html() != null) { | ||
+ | if ($("#menubar ul li:first").html() != "teams") | ||
+ | $("#cbp-spmenu-s2").append($("#menubar ul li:first").html()); | ||
+ | $("#menubar ul li:first").remove(); | ||
+ | } | ||
+ | // push menu javascript | ||
+ | var menuLeft = document.getElementById( 'cbp-spmenu-s1' ), | ||
+ | menuRight = document.getElementById( 'cbp-spmenu-s2' ), | ||
+ | showLeftPush = document.getElementById( 'showLeftPush' ), | ||
+ | showRightPush = document.getElementById( 'showRightPush' ), | ||
+ | body = document.body; | ||
+ | |||
+ | showLeftPush.onclick = function() { | ||
+ | classie.toggle( this, 'active' ); | ||
+ | classie.toggle( body, 'cbp-spmenu-push-toright' ); | ||
+ | classie.toggle( menuLeft, 'cbp-spmenu-open' ); | ||
+ | disableOther( 'showLeftPush' ); | ||
+ | }; | ||
+ | showRightPush.onclick = function() { | ||
+ | classie.toggle( this, 'active' ); | ||
+ | classie.toggle( body, 'cbp-spmenu-push-toleft' ); | ||
+ | classie.toggle( menuRight, 'cbp-spmenu-open' ); | ||
+ | disableOther( 'showRightPush' ); | ||
+ | }; | ||
+ | |||
+ | function disableOther( button ) { | ||
+ | if( button !== 'showLeftPush' ) { | ||
+ | classie.toggle( showLeftPush, 'disabled' ); | ||
+ | } | ||
+ | if( button !== 'showRightPush' ) { | ||
+ | classie.toggle( showRightPush, 'disabled' ); | ||
+ | } | ||
+ | } | ||
+ | // add "cbp-spmenu-push" class to <body> label | ||
+ | $("body").addClass("cbp-spmenu-push"); | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Latest revision as of 12:28, 22 August 2013
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
说明
顶部颜色:#102B66
底部颜色:#01164B
清除方法
由于所有列都是浮动的,因此,此布局在 .footer 规则中采用 clear:both 声明。此清除方法强制使 .container 了解列的结束位置,以便显示在 .container 中放置的任何边框或背景颜色。如果您的设计要求您从 .container 中删除 .footer,则需要采用其它清除方法。最可靠的方法是在最后一个浮动列之后(但在 .container 结束之前)添加 <br class="clearfloat" /> or <div class="clearfloat"></div>。这具有相同的清除效果。
徽标替换
此布局的 .header 中使用了图像占位符,您可能希望在其中放置徽标。建议您删除此占位符,并将其替换为您自己的链接徽标。
请注意,如果您使用属性检查器导航到使用 SRC 字段的徽标图像(而不是删除并替换占位符),则应删除内嵌背景和显示属性。这些内嵌样式仅用于在浏览器中出于演示目的而显示徽标占位符。
要删除内嵌样式,请确保将 CSS 样式面板设置为“当前”。选择图像,然后在“CSS 样式”面板的“属性”窗格中右键单击并删除显示和背景属性。(当然,您始终可以直接访问代码,并在其中删除图像或占位符的内嵌样式。)
背景
本质上,任何 div 中的背景颜色将仅显示与内容一样的长度。这意味着,如果要使用背景颜色或边框创建侧面列的外观,将不会一直扩展到脚注,而是在内容结束时停止。如果 .content div 将始终包含更多内容,则可以在 .content div 中放置一个边框将其与列分开。