Team:SJTU-Software2/test

From 2014.igem.org

(Difference between revisions)
 
(321 intermediate revisions not shown)
Line 1: Line 1:
{{CSS/Main}}
{{CSS/Main}}
 +
 +
<html>
<html>
-
    <head>
 
-
        <title>Slide Down Box Menu with jQuery and CSS3</title>
 
-
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 
-
        <meta name="description" content="Slide Down Box Menu with jQuery and CSS3" />
 
-
        <meta name="keywords" content="jquery, css3, sliding, box, menu, cube, navigation, portfolio, thumbnails"/>
 
-
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"/>
 
-
        <link rel="stylesheet" href="https://2014.igem.org/Team:SJTU-Software/bootstrapmin.css%20?action=raw&ctype=text/css" type="text/css" media="screen"/>
 
-
        <style>
 
-
body{
 
-
background:#333 url(https://static.igem.org/mediawiki/2014/9/98/Bg.jpg) repeat top left;
 
-
font-family:Arial;
 
-
}
 
-
span.reference{
 
-
position:fixed;
 
-
left:10px;
 
-
bottom:10px;
 
-
font-size:12px;
 
-
}
 
-
span.reference a{
 
-
color:#aaa;
 
-
text-transform:uppercase;
 
-
text-decoration:none;
 
-
text-shadow:1px 1px 1px #000;
 
-
margin-right:30px;
 
-
}
 
-
span.reference a:hover{
 
-
color:#ddd;
 
-
}
 
-
ul.sdt_menu{
 
-
margin-top:150px;
 
-
}
 
-
h1.title{
 
-
text-indent:-9000px;
 
-
background:transparent url(title.png) no-repeat top left;
 
-
width:633px;
 
-
height:69px;
 
-
}
 
-
</style>
 
-
    </head>
 
-
    <body>
+
<!--main content -->
-
<div class="content">
+
 
-
<h1 class="title">Slide Down Box Menu with jQuery and CSS3</h1>
+
<p>
-
<ul id="sdt_menu" class="sdt_menu">
+
<style type="text/css"> body {background-image:url(https://static.igem.org/mediawiki/2014/5/57/Sjtu_software_background.jpg); background-repeat:no-repeat; background-attachment:fixed} </style>
-
<li>
+
<script type="text/javascript" src="https://2014.igem.org/Team:SJTU-Software/182min.js%20?action=raw&ctype=text/js"></script>
-
<a href="#">
+
<script type="text/javascript" src="https://2014.igem.org/Team:SJTU-Software/toolsmin.js%20?action=raw&ctype=text/js"></script>
-
<img src="https://static.igem.org/mediawiki/2014/b/bd/Test.jpg" alt=""/>
+
<script type="text/javascript" src="https://2014.igem.org/Team:SJTU-Software/main.js%20?action=raw&ctype=text/js"></script>
-
<span class="sdt_active"></span>
+
<style type="text/css">
-
<span class="sdt_wrap">
+
 
-
<span class="sdt_link">About me</span>
+
.slider
-
<span class="sdt_descr">Get to know me</span>
+
{
-
</span>
+
    background: #d5d5d5;
-
</a>
+
    height: 7px;
-
</li>
+
    position: relative;
-
<li>
+
    cursor: pointer;
-
<a href="#">
+
    width: 100%;
-
<img src="https://static.igem.org/mediawiki/2014/b/bd/Test.jpg" alt=""/>
+
    clear: right;
-
<span class="sdt_active"></span>
+
    top: 0px;
-
<span class="sdt_wrap">
+
    -moz-border-radius: 5px;
-
<span class="sdt_link">Portfolio</span>
+
    -webkit-border-radius: 5px;
-
<span class="sdt_descr">My work</span>
+
    -moz-box-shadow: inset 0 0 8px #000;
-
</span>
+
    margin: 10px 0 10px 0;
-
</a>
+
}
-
<div class="sdt_box">
+
 
-
<a href="#">Websites</a>
+
/* progress bar (enabled with progress: true) */
-
<a href="#">Illustrations</a>
+
.progress
-
<a href="#">Photography</a>
+
{
-
</div>
+
    height: 7px;
-
</li>
+
    position: relative;
-
<li>
+
    background: #5389c5; /* Old browsers */
-
<a href="#">
+
background: -moz-linear-gradient(top, #5389c5 0%, #4775a9 100%); /* FF3.6+ */
-
<img src="https://static.igem.org/mediawiki/2014/b/bd/Test.jpg" alt=""/>
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5389c5), color-stop(100%,#4775a9)); /* Chrome,Safari4+ */
-
<span class="sdt_active"></span>
+
background: -webkit-linear-gradient(top, #5389c5 0%,#4775a9 100%); /* Chrome10+,Safari5.1+ */
-
<span class="sdt_wrap">
+
background: -o-linear-gradient(top, #5389c5 0%,#4775a9 100%); /* Opera 11.10+ */
-
<span class="sdt_link">Inspiration</span>
+
background: -ms-linear-gradient(top, #5389c5 0%,#4775a9 100%); /* IE10+ */
-
<span class="sdt_descr">Where ideas get born</span>
+
background: linear-gradient(to bottom, #5389c5 0%,#4775a9 100%); /* W3C */
-
</span>
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5389c5', endColorstr='#4775a9',GradientType=0 ); /* IE6-9 */
-
</a>
+
    -moz-border-radius: 5px;
-
</li>
+
    -webkit-border-radius: 5px;
-
<li>
+
    top: 0px;
-
<a href="#">
+
    border: 1px solid #4b7bb1;
-
<img src="https://static.igem.org/mediawiki/2014/b/bd/Test.jpg" alt=""/>
+
 
-
<span class="sdt_active"></span>
+
    -moz-box-shadow: inset 0 .7px 0 0 rgba(255, 255, 255, 0.3);
-
<span class="sdt_wrap">
+
-webkit-box-shadow: inset 0 .7px 0 0 rgba(255, 255, 255, 0.3);
-
<span class="sdt_link">Photos</span>
+
box-shadow: inset 0 .7px 0 0 rgba(255, 255, 255, 0.3);
-
<span class="sdt_descr">I like to photograph</span>
+
}
-
</span>
+
 
-
</a>
+
/* drag handle */
-
</li>
+
.handle
-
<li>
+
{
-
<a href="#">
+
    background: url(../images/handle.png) repeat-x center;
-
<img src="https://static.igem.org/mediawiki/2014/b/bd/Test.jpg" alt=""/>
+
    height: 16px;
-
<span class="sdt_active"></span>
+
    width: 16px;
-
<span class="sdt_wrap">
+
    top: -5px;
-
<span class="sdt_link">Blog</span>
+
    position: absolute;
-
<span class="sdt_descr">I write about design</span>
+
    display: block;
-
</span>
+
    margin-top: 1px;
-
</a>
+
    cursor: pointer;
-
</li>
+
 
-
<li>
+
}
-
<a href="#">
+
 
-
<img src="https://static.igem.org/mediawiki/2014/b/bd/Test.jpg" alt=""/>
+
/* the input field */
-
<span class="sdt_active"></span>
+
.range
-
<span class="sdt_wrap">
+
{
-
<span class="sdt_link">Projects</span>
+
    display: none;
-
<span class="sdt_descr">I like to code</span>
+
}
-
</span>
+
/*
-
</a>
+
* CSS Expandable Menu
-
<div class="sdt_box">
+
* @author: Francisco Neves
-
<a href="#">Job Board Website</a>
+
*/
-
<a href="#">Shopping Cart</a>
+
 
-
<a href="#">Interactive Maps</a>
+
/** Reset */
-
</div>
+
* { font-family: "museo500", "Arial"; font-size: 12px; list-style: none; margin: 0; padding: 0; outline: 0; text-decoration: none; box-sizing: border-box !important; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; -ms-box-sizing: border-box !important; }
-
</li>
+
 
-
</ul>
+
/**
-
</div>
+
*  START FREEBIE STYLES
-
     
+
*/
 +
 
 +
/*! Font Faces */
 +
@font-face{
 +
font-family: 'museo500';
 +
    src: url('../fonts/MuseoSans_500-webfont.eot');
 +
    src: url('../fonts/MuseoSans_500-webfont.eot?#iefix') format('embedded-opentype'),
 +
        url('../fonts/MuseoSans_500-webfont.woff') format('woff'),
 +
        url('../fonts/MuseoSans_500-webfont.ttf') format('truetype'),
 +
        url('../fonts/MuseoSans_500-webfont.svg#museo_sans_500regular') format('svg');
 +
    font-weight: normal;
 +
    font-style: normal;
 +
}
 +
 
 +
/*! Freebie Skelet */
 +
ul.expmenu { width: 200px; }
 +
ul.expmenu * { list-style: none; }
 +
ul.expmenu > li > div.header { padding: 12px; border-bottom: 1px #396e9f solid; }
 +
ul.expmenu > li:last-child > div.header { border-bottom: none; }
 +
ul.expmenu > li ul li { background-color: #ececec; padding: 12px; border-bottom: 1px solid #dcdcdc; border-top: 1px solid #fff; color: #727272; text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.8); }
 +
ul.expmenu > li ul li:last-child { border-bottom: none; }
 +
ul.expmenu > li ul li.selected { background-color: #f4f4f4; }
 +
ul.expmenu div.header
 +
{
 +
color: #203f61;
 +
text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.2);
 +
 
 +
background: #4d7fb8; /* Old browsers */
 +
background: -moz-linear-gradient(top, #4d7fb8 0%, #4572a5 100%); /* FF3.6+ */
 +
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4d7fb8), color-stop(100%,#4572a5)); /* Chrome,Safari4+ */
 +
background: -webkit-linear-gradient(top, #4d7fb8 0%,#4572a5 100%); /* Chrome10+,Safari5.1+ */
 +
background: -o-linear-gradient(top, #4d7fb8 0%,#4572a5 100%); /* Opera 11.10+ */
 +
background: -ms-linear-gradient(top, #4d7fb8 0%,#4572a5 100%); /* IE10+ */
 +
background: linear-gradient(to bottom, #4d7fb8 0%,#4572a5 100%); /* W3C */
 +
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4d7fb8', endColorstr='#4572a5',GradientType=0 ); /* IE6-9 */
 +
}
 +
ul.expmenu > li > div.header > .label { padding-left: 24px; background: no-repeat; }
 +
ul.expmenu > li > div.header > .arrow { display: block; width: 16px; height: 16px; background: no-repeat center; float: right; }
 +
ul.expmenu > li > div.header > .arrow.up { background-image: url(../images/arrow_u.png); }
 +
ul.expmenu > li > div.header > .arrow.down { background-image: url(../images/arrow_d.png); }
 +
 
 +
/* Mouse Events */
 +
ul.expmenu div.header:hover
 +
{
 +
background: #4571a0; /* Old browsers */
 +
background: -moz-linear-gradient(top, #4d7fb8 0%, #4571a0 100%); /* FF3.6+ */
 +
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4d7fb8), color-stop(100%,#4571a0)); /* Chrome,Safari4+ */
 +
background: -webkit-linear-gradient(top, #4d7fb8 0%,#4571a0 100%); /* Chrome10+,Safari5.1+ */
 +
background: -o-linear-gradient(top, #4d7fb8 0%,#4571a0 100%); /* Opera 11.10+ */
 +
background: -ms-linear-gradient(top, #4d7fb8 0%,#4571a0 100%); /* IE10+ */
 +
background: linear-gradient(to bottom, #4d7fb8 0%,#4571a0 100%); /* W3C */
 +
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4d7fb8', endColorstr='#4571a0',GradientType=0 ); /* IE6-9 */
 +
 
 +
cursor: pointer;
 +
}
 +
 
 +
ul.expmenu > li ul li:not(.selected):hover
 +
{
 +
background: #e7e7e7; /* Old browsers */
 +
 
 +
cursor: pointer;
 +
}
 +
ul.expmenu > li ul li:not(.selected):active
 +
{
 +
background: #f1f1f1; /* Old browsers */
 +
 
 +
cursor: pointer;
 +
}
 +
/**
 +
*  END FREEBIE STYLES
 +
*/
 +
 +
 
 +
/**
 +
* Not important styles
 +
*/
 +
body
 +
{
 +
color: #b1b1b1;
 +
background: #e1e1e1; /* Old browsers */
 +
 
 +
font-family: "museo500";
 +
}
 +
ul#pagination-freebie { display: table; padding-right: 20px; margin: 20px auto; list-style: none; }
 +
ul#pagination-freebie:last-child { padding-right: 0; }
 +
ul#pagination-freebie li { float: left; margin-bottom: 20px }
 +
ul#pagination-freebie li:last-child { margin-right: 0; }
 +
 
 +
div#text { text-align: center; font-size: 48px; width: 610px; margin: 0 auto; margin-top: 50px; margin-top: 80px; }
 +
div#smalltext { text-align: center; font-size: 15px; width: 600px; margin: 0 auto; }
 +
div#content { display: table; margin: 0 auto; padding: 30px; }
 +
</style>
 +
 
 +
 
 +
<div align="center">
 +
    <div class="container2" style="height:700px;width:71%;background-color:#FFFFFF;">
 +
          <div align=left>
 +
          <div class="container2" style="height:700px;width:30%;background-color:#00FF00;float:left; display:inline" >
 +
          <div id="content">
 +
<ul id="expmenu-freebie">
 +
<li>
 +
<!-- Start Freebie -->
 +
<ul class="expmenu">
 +
<li>
 +
<div class="header">
 +
<span class="label" style="background-image: url(images/messages.png);">Messages</span>
 +
<span class="arrow up"></span>
 +
</div>
 +
<ul class="menu">
 +
<li>Notification Settings</li>
 +
<li class="selected">Email Alerts</li>
 +
<li>Privacy Settings</li>
 +
</ul>
 +
</li>
 +
<li>
 +
<div class="header">
 +
<span class="label" style="background-image: url(images/user.png);">User Controls</span>
 +
<span class="arrow up"></span>
 +
</div>
 +
<ul class="menu">
 +
<li><input type="range" name="range" min="0" max="100" value="35" style="width: 100%;" /></li>
 +
</ul>
 +
</li>
 +
<li>
 +
<div class="header">
 +
<span class="label" style="background-image: url(images/pc.png);">Screen Settings</span>
 +
<span class="arrow down"></span>
 +
</div>
 +
<ul class="menu" style="display:none">
 +
<li>Your settings</li>
 +
</ul>
 +
</li>
 +
<li>
 +
<div class="header">
 +
<span class="label" style="background-image: url(images/search.png);">Search</span>
 +
</div>
 +
</li>
 +
</ul>
 +
<!-- End Freebie -->
 +
</li>
 +
</ul>
 +
  </div>
 +
          </div>  
 +
         
 +
           
 +
          <div  class="container2" style="height:700px;width:70%;background-color:#FFFF00;float:left; display:inline" >
 +
          </div>          
 +
          </div>
 +
    </div>
 +
 
 +
</div>    
 +
   
 +
 
 +
   
 +
 
 +
 
-
        <!-- The JavaScript -->
+
</body>
-
        <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://2014.igem.org/Team:SJTU-Software/jquery.js%20?action=raw&ctype=text/js"></script>
+
-
        <script type="text/javascript">
+
-
            $(function() {
+
-
/**
+
-
* for each menu element, on mouseenter,
+
-
* we enlarge the image, and show both sdt_active span and
+
-
* sdt_wrap span. If the element has a sub menu (sdt_box),
+
-
* then we slide it - if the element is the last one in the menu
+
-
* we slide it to the left, otherwise to the right
+
-
*/
+
-
                $('#sdt_menu > li').bind('mouseenter',function(){
+
-
var $elem = $(this);
+
-
$elem.find('img')
+
-
.stop(true)
+
-
.animate({
+
-
'width':'170px',
+
-
'height':'170px',
+
-
'left':'0px'
+
-
},400,'easeOutBack')
+
-
.andSelf()
+
-
.find('.sdt_wrap')
+
-
    .stop(true)
+
-
.animate({'top':'140px'},500,'easeOutBack')
+
-
.andSelf()
+
-
.find('.sdt_active')
+
-
    .stop(true)
+
-
.animate({'height':'170px'},300,function(){
+
-
var $sub_menu = $elem.find('.sdt_box');
+
-
if($sub_menu.length){
+
-
var left = '170px';
+
-
if($elem.parent().children().length == $elem.index()+1)
+
-
left = '-170px';
+
-
$sub_menu.show().animate({'left':left},200);
+
-
}
+
-
});
+
-
}).bind('mouseleave',function(){
+
-
var $elem = $(this);
+
-
var $sub_menu = $elem.find('.sdt_box');
+
-
if($sub_menu.length)
+
-
$sub_menu.hide().css('left','0px');
+
-
+
-
$elem.find('.sdt_active')
+
-
.stop(true)
+
-
.animate({'height':'0px'},300)
+
-
.andSelf().find('img')
+
-
.stop(true)
+
-
.animate({
+
-
'width':'0px',
+
-
'height':'0px',
+
-
'left':'85px'},400)
+
-
.andSelf()
+
-
.find('.sdt_wrap')
+
-
.stop(true)
+
-
.animate({'top':'25px'},500);
+
-
});
+
-
            });
+
-
        </script>
+
-
    </body>
+
</html>
</html>

Latest revision as of 08:01, 12 October 2014


    • Messages
    • User Controls
    • Screen Settings
    • Search