Line 5: | Line 5: | ||
− | <!--page--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | + | <!--page--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |
− | <img class="bgPic" src="https://static.igem.org/mediawiki/2018/8/8f/T--Fudan-CHINA--bgpicture2.jpeg" style="z-index: -1;-webkit-filter: brightness(0.85); | + | <div id="div1"> |
− | filter: brightness(0.85);width=100%" /> | + | <!--<img class="bgPic" src="https://static.igem.org/mediawiki/2018/8/8f/T--Fudan-CHINA--bgpicture2.jpeg" style="z-index: -1;-webkit-filter: brightness(0.85); |
+ | filter: brightness(0.85);width=100%" />--> | ||
+ | <video id="bgVideo" autoplay muted loop> | ||
+ | <source src="https://static.igem.org/mediawiki/2018/f/fd/T--Fudan-CHINA--bgVideo.mp4"> | ||
+ | </video> | ||
+ | |||
+ | <div id="stepDiv"> | ||
+ | <img id="stepPic" src="https://static.igem.org/mediawiki/2018/1/1d/T--Fudan-CHINA--step_white.png" /> | ||
+ | <div id="stepName"> S T E P</div> | ||
+ | </div> | ||
+ | <div id="fullName">Synthetic Transducer Engineering Platform</div> | ||
+ | </div> | ||
+ | |||
+ | |||
+ | |||
+ | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<style> | <style> | ||
− | #fullName{ | + | #div1{ |
+ | width: 100%; | ||
+ | overflow: hidden; | ||
+ | } | ||
+ | #bgVideo{ | ||
+ | position: relative; | ||
+ | } | ||
+ | #stepDiv,#fullName{ | ||
position: absolute; | position: absolute; | ||
− | + | ||
+ | } | ||
+ | #stepName{ | ||
+ | display: inline-block; | ||
color: white; | color: white; | ||
− | font- | + | font-family: Algerian,_Algerian; |
− | font- | + | |
+ | vertical-align: middle; | ||
+ | } | ||
+ | #stepPic{ | ||
+ | max-width: 10.5vw; | ||
+ | max-height: 30vh; | ||
+ | } | ||
+ | #fullName{ | ||
+ | color: white; | ||
+ | font-family:"Lucida Calligraphy",_LucidaCalligraphy; | ||
+ | padding: 0;margin: 0; | ||
} | } | ||
</style> | </style> | ||
<script> | <script> | ||
− | + | function div1Fun(){ | |
− | + | var videoWidth=1920; | |
− | + | var videoHeight=1080; | |
− | + | var winWidth=$(window).width(); | |
− | + | var winHeight=$(window).height(); | |
− | + | $("#div1").css("height",winHeight); | |
− | + | if (winWidth*videoHeight>winHeight*videoWidth ){ | |
− | + | $("#bgVideo").css("width",winWidth); | |
− | + | $("#bgVideo").css("top",0.5*(winHeight-videoHeight*winWidth/videoWidth)); | |
− | $("# | + | $("#bgVideo").css("Height",videoHeight*winWidth/videoWidth); |
− | $("# | + | $("#bgVideo").css("left",0); |
− | + | } | |
− | $("# | + | else{ |
− | $("#fullName").css(" | + | $("#bgVideo").css("Height",winHeight); |
− | } | + | $("#bgVideo").css("left",0.5*(winWidth-videoWidth*winHeight/videoHeight)); |
− | + | $("#bgVideo").css("width",videoWidth*winHeight/videoHeight); | |
− | + | $("#bgVideo").css("top",0); | |
− | + | } | |
− | + | ||
− | + | if (winWidth/winHeight>21/8.5){ | |
− | + | $("#stepName").css("font-size","21vh"); | |
− | + | } | |
− | + | else{ | |
− | + | $("#stepName").css("font-size","8.5vw"); | |
− | + | } | |
− | + | if (winWidth/winHeight>5/2.2){ | |
− | } | + | $("#fullName").css("font-size","5vh"); |
− | + | } | |
− | + | else{ | |
− | + | $("#fullName").css("font-size","2.2vw"); | |
− | + | } | |
+ | |||
+ | var stepHeight=$("#stepDiv").height(); | ||
+ | var stepWidth=$("#stepDiv").width(); | ||
+ | var fnWidth=$("#fullName").width(); | ||
+ | var fnHeight=$("#fullName").height(); | ||
+ | var intervalHeight=0.03*winHeight | ||
+ | $("#stepDiv").css("top",0.5*(winHeight-(stepHeight+intervalHeight+fnHeight))); | ||
+ | $("#fullName").css("top",0.5*(winHeight-(stepHeight+intervalHeight+fnHeight))+stepHeight+intervalHeight); | ||
+ | $("#stepDiv").css("left",0.5*(winWidth-stepWidth)); | ||
+ | $("#fullName").css("left",0.5*(winWidth-fnWidth)); | ||
+ | |||
+ | } | ||
+ | div1Fun(); | ||
+ | $(window).resize(function(){ | ||
+ | div1Fun(); | ||
+ | }); | ||
+ | |||
+ | |||
+ | |||
</script> | </script> | ||
Line 92: | Line 115: | ||
<!--end---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | <!--end---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | ||
+ | |||
Revision as of 06:13, 24 September 2018
S T E P
Synthetic Transducer Engineering Platform