Template:Team:KIT-Kyoto/hp
From 2014.igem.org
(Difference between revisions)
Line 12: | Line 12: | ||
var loop = setInterval(function() { | var loop = setInterval(function() { | ||
- | var pic = $(". | + | var pic = $(".pic1").index(this); |
- | var clone = $(". | + | var clone = $(".pic1 li:first").clone(true); |
- | $(". | + | $(".pic1 li:first").animate({ |
- | marginRight : " | + | marginRight : "30%" |
}, { | }, { | ||
duration : 1200, | duration : 1200, | ||
complete : function() { | complete : function() { | ||
- | $(". | + | $(".pic1 li:first").remove(); |
- | clone.clone(true).insertAfter($(". | + | clone.clone(true).insertAfter($(".pic1 li:last")); |
+ | } | ||
+ | }); | ||
+ | }, 2000); | ||
+ | |||
+ | |||
+ | var loop = setInterval(function() { | ||
+ | var clone = $(".pic2 li:first").clone(true); | ||
+ | $(".pic2 li:first").animate({ | ||
+ | marginLeft : "-300px" | ||
+ | }, { | ||
+ | duration : 1200, | ||
+ | complete : function() { | ||
+ | $(".pic2 li:first").remove(); | ||
+ | clone.clone(true).insertAfter($(".pic2 li:last")); | ||
+ | } | ||
+ | }); | ||
+ | }, 2000); | ||
+ | |||
+ | var loop = setInterval(function() { | ||
+ | var pic = $(".pic3").index(this); | ||
+ | var clone = $(".pic3 li:first").clone(true); | ||
+ | $(".pic3 li:first").animate({ | ||
+ | marginRight : "30%" | ||
+ | }, { | ||
+ | duration : 1200, | ||
+ | complete : function() { | ||
+ | $(".pic3 li:first").remove(); | ||
+ | clone.clone(true).insertAfter($(".pic3 li:last")); | ||
} | } | ||
}); | }); | ||
Line 27: | Line 55: | ||
var w = $("#picbox").width(); | var w = $("#picbox").width(); | ||
var m = w / 2; | var m = w / 2; | ||
- | $("#picbox").css({ | + | $("#picbox").css({"margin-left":"-m"}); |
}); | }); | ||
Line 99: | Line 127: | ||
#picbox{ | #picbox{ | ||
- | |||
position:relative; | position:relative; | ||
top:10px; | top:10px; | ||
left:50%; | left:50%; | ||
} | } | ||
- | . | + | |
+ | .pic1,.pic2,.pic3 { | ||
list-style: none; | list-style: none; | ||
- | |||
overflow: hidden; | overflow: hidden; | ||
position: relative; | position: relative; | ||
Line 112: | Line 139: | ||
} | } | ||
- | . | + | .pic1 img,.pic3 img{ |
- | width: | + | width:30%; |
float:right; | float:right; | ||
+ | } | ||
+ | |||
+ | .pic2 img{ | ||
+ | width:30%; | ||
+ | float:left; | ||
} | } | ||
</style> | </style> |
Revision as of 06:49, 26 September 2014