Team:Tsinghua/Team
From 2013.igem.org
(Difference between revisions)
Line 112: | Line 112: | ||
<div class="normal"> | <div class="normal"> | ||
<style type="text/css"> | <style type="text/css"> | ||
- | + | .photo-row { | |
- | + | } | |
- | + | .photo-row img { | |
- | + | width: 220px; | |
- | + | height: auto; | |
- | + | margin: 10px 10px 5px 10px; | |
- | + | border: 1px solid #AAAAAA; | |
- | + | } | |
- | + | .photo-desc { | |
- | + | margin: 0px 20px 0px 10px; | |
- | + | background-color: white; | |
- | + | padding:0.5em; | |
- | + | height: 60px; | |
- | + | } | |
- | + | ||
- | + | .photo-desc p { | |
- | + | margin: 0.5em; | |
- | + | } | |
- | + | ||
- | + | .photo-name { | |
- | + | } | |
- | + | ||
- | + | #gallery { | |
- | + | width: 750px; | |
- | + | margin: auto; | |
- | + | } | |
- | + | ||
- | + | ||
- | + | </style> | |
<h1>Team</h1> | <h1>Team</h1> | ||
<div id="gallery"> | <div id="gallery"> | ||
Line 205: | Line 205: | ||
["Wang Jun", "Is there anything else we cannot conquer?"], | ["Wang Jun", "Is there anything else we cannot conquer?"], | ||
["Shi Xiaojing", "I'm trying to make the world more beautiful"]]; | ["Shi Xiaojing", "I'm trying to make the world more beautiful"]]; | ||
- | + | var descDivs = $("div.photo-desc"); | |
- | + | $("#gallery img").hover(function(){ | |
- | + | var n = names.length; | |
- | + | var row = Math.floor($(this).parent().index() / 2); | |
- | + | var i = $(this).index() + 3 * row; | |
- | + | //alert('index:' + i + ', row: ' + row + ', n:' + n); | |
- | + | $(descDivs.get(row)).html('<p><b>' + names[i][0] + '</b></p><p>' + names[i][1] + '</p>'); | |
- | + | }); | |
- | + | </script> | |
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | setupMenu(); | |
- | + | </script> | |
</body></html> | </body></html> |
Revision as of 18:39, 26 September 2013