Permalink
Browse files

上传特效例子

  • Loading branch information...
RubyLouvre committed Dec 27, 2012
1 parent 0a5a6bd commit 786a76919f3ee3b271ba211c9bb2ba47dc727031
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
+ <head>
+ <meta charset="UTF-8" />
+ <title>测试</title>
+ <style>
+
+ #parent{
+ width:200px;
+ height:200px;
+ overflow:hidden;
+ }
+ #parent img{
+ width:50px;
+ height:50px;
+ float:left;
+ display:inline-block;
+ position: relative;
+ }
+ </style>
+ <script src="mass_merge.js">
+
+ </script>
+ <script >
+ require("fx,event,ready", function($){
+ var html = ""
+ for(var i = 0; i < 20; i++){
+ var src = i
+ if(i < 10){
+ src = "0"+i
+ }
+ html += "<img data-index="+i+" src='images/" + src +".jpg'/>"
+ }
+ $("#parent").append(html)
+ var animating = 0
+ $("#parent img").on("mouseover", function(){
+ if(!animating){
+ animating = 1;
+ this.style.zIndex = 10;
+ var hash = {
+ width: 100,
+ height:100
+ }
+ if($(this).data("index") > 11){
+ hash.marginTop = "-=50";
+ }
+ $(this).animate(hash,700)
+ }
+ }).on("mouseout", function(){
+ if(animating){
+ $(":animated").stop(true, true)
+ animating = 0;
+ this.style.zIndex = 0;
+ this.style.marginTop = "0px"
+ $(this).animate( {
+ width: 50,
+ height:50
+ },700)
+ }
+ })
+ })
+ </script>
+ </head>
+
+ <body>
+ <h1>移上去放大,移出去还原</h1>
+ <div id="parent">
+
+ </div>
+
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit 786a769

Please sign in to comment.