Jackyang0216 (Talk | contribs) |
|||
(15 intermediate revisions by 3 users not shown) | |||
Line 17: | Line 17: | ||
padding: 0 10%; | padding: 0 10%; | ||
} | } | ||
+ | |||
+ | .top { | ||
+ | position: fixed; | ||
+ | right: 50px; | ||
+ | bottom: 50px; | ||
+ | height: 50px; | ||
+ | width: 50px; | ||
+ | cursor: pointer; } | ||
+ | .top img { | ||
+ | width: 100%; } | ||
</style> | </style> | ||
Line 23: | Line 33: | ||
<div id="home-cover"> | <div id="home-cover"> | ||
<img src="https://static.igem.org/mediawiki/2017/5/5e/T--CSMU_NCHU_Taiwan--home_cover.png" alt="" style="width:100%;"> | <img src="https://static.igem.org/mediawiki/2017/5/5e/T--CSMU_NCHU_Taiwan--home_cover.png" alt="" style="width:100%;"> | ||
+ | <img src="https://static.igem.org/mediawiki/2017/d/da/T--CSMU_NCHU_Taiwan--sponsors3.png" alt="" style="width:100%" align="right"> | ||
+ | </div> | ||
+ | |||
+ | <div class="top"> | ||
+ | <img src="https://static.igem.org/mediawiki/2017/5/52/T--CSMU_NCHU_Taiwan--top.png" alt=""> | ||
</div> | </div> | ||
</body> | </body> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function(){ | ||
+ | |||
+ | |||
+ | |||
+ | $('.top').on('click', function(){ | ||
+ | $('html, body').animate({scrollTop: '0px'}, 500); | ||
+ | }); | ||
+ | |||
+ | }); | ||
+ | |||
+ | function toggleContainer(i){ | ||
+ | return function(){ | ||
+ | if($('#public-'+i).is(":visible")){ | ||
+ | $('#public-'+i).slideToggle(500); | ||
+ | } | ||
+ | else{ | ||
+ | $('.img-container:visible').slideToggle(500); | ||
+ | $('#public-'+i).slideToggle(500); | ||
+ | } | ||
+ | $('.hp-bg-container').css('max-height','none') | ||
+ | $('.main-content').css('min-height','200vh') | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | </script> | ||
</html> | </html> |
Latest revision as of 08:24, 1 November 2017