Team:HZAU-China/Team
From 2013.igem.org
(Difference between revisions)
Line 71: | Line 71: | ||
img{ border:none;} | img{ border:none;} | ||
.item{float:left; width:190px; padding:0 10px; height:78px; overflow:hidden;} | .item{float:left; width:190px; padding:0 10px; height:78px; overflow:hidden;} | ||
- | .item .item- | + | .item .item-t1{ height:190px; background:#7770B4;} |
- | .item .item- | + | .item .item-b1{ height:190px; background:#8CA6C0;} |
+ | .item .item-t2{ height:190px; background:#FFD017;} | ||
+ | .item .item-b2{ height:190px; background:#F3D972;} | ||
</style> | </style> | ||
<script> | <script> | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
- | var changeH=$(".item- | + | var changeH=$(".item-t1").outerHeight();//变化的高度 |
$(".itemwrap .item").each(function(index){ | $(".itemwrap .item").each(function(index){ | ||
$(this).hover(function(){ | $(this).hover(function(){ | ||
//mouseenter代码段 | //mouseenter代码段 | ||
- | $(this).find(".item- | + | $(this).find(".item-t1").stop(true).animate({"margin-top":-changeH},300); |
},function(){ | },function(){ | ||
//mouseleave代码段 | //mouseleave代码段 | ||
- | $(this).find(".item- | + | $(this).find(".item-t1").stop(true).animate({"margin-top":0},300); |
+ | }); | ||
+ | |||
+ | }) | ||
+ | }) | ||
+ | </script> | ||
+ | <script> | ||
+ | $(document).ready(function(){ | ||
+ | var changeH=$(".item-t2").outerHeight();//变化的高度 | ||
+ | $(".itemwrap .item").each(function(index){ | ||
+ | $(this).hover(function(){ | ||
+ | //mouseenter代码段 | ||
+ | $(this).find(".item-t2").stop(true).animate({"margin-top":-changeH},300); | ||
+ | },function(){ | ||
+ | //mouseleave代码段 | ||
+ | $(this).find(".item-t2").stop(true).animate({"margin-top":0},300); | ||
}); | }); | ||
Revision as of 12:51, 12 September 2013