Template:Team:NCTU Formosa/header-safety

From 2012.igem.org

(Difference between revisions)
Line 87: Line 87:
#toc {
#toc {
display:none;
display:none;
 +
}
 +
 +
#back-top {
 +
position:
 +
 +
fixed;
 +
bottom: 30px;
 +
margin-left: -150px;
 +
}
 +
#back-top a {
 +
width: 81px;
 +
display: block;
 +
text-align: center;
 +
 +
 +
font: 11px/100% Arial, Helvetica, sans-serif;
 +
text-transform: uppercase;
 +
text-decoration: none;
 +
color: #bbb;
 +
 +
 +
/* background color transition */
 +
-webkit-transition: 1s;
 +
-moz-transition: 1s;
 +
transition: 1s;
 +
}
 +
#back-top
 +
 +
a:hover {
 +
color: #000;
 +
}
 +
/* arrow icon (span tag) */
 +
#back-top span {
 +
width: 81px;
 +
height: 81px;
 +
 +
 +
display: block;
 +
margin-bottom: 7px;
 +
background: #ddd url(https://static.igem.org/mediawiki/2012/b/b3/Up-arrow.png) no-
 +
 +
repeat center center;
 +
/* rounded corners */
 +
-webkit-border-radius: 15px;
 +
-moz-border-radius: 15px;
 +
 +
 +
border-radius: 15px;
 +
/* background color transition */
 +
-webkit-transition: 1s;
 +
-moz-transition: 1s;
 +
 +
 +
transition: 1s;
 +
}
 +
#back-top a:hover span {
 +
background-color: #777;
}
}
</style>
</style>
 +
<script
 +
 +
type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
 +
 +
<script>
 +
$(document).ready(function(){
 +
 +
// hide #back-top first
 +
$("#back-top").hide();
 +
 +
// fade in #back-top
 +
 +
 +
$(function () {
 +
$(window).scroll(function () {
 +
if ($(this).scrollTop() > 100) {
 +
 +
 +
$('#back-top').fadeIn();
 +
} else {
 +
$('#back-
 +
 +
top').fadeOut();
 +
}
 +
});
 +
 +
// scroll body to 0px on click
 +
 +
 +
$('#back-top a').click(function () {
 +
$('body,html').animate({
 +
 +
 +
scrollTop: 0
 +
}, 800);
 +
return false;
 +
});
 +
});
 +
 +
});
 +
</script>
</head>
</head>
<body>
<body>

Revision as of 03:45, 7 September 2012