Skip to content

Instantly share code, notes, and snippets.

@hu-qi
Created May 7, 2018 09:17
Show Gist options
  • Save hu-qi/82d01bc291a8ad2230fae2959eecbf0f to your computer and use it in GitHub Desktop.
Save hu-qi/82d01bc291a8ad2230fae2959eecbf0f to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/taxivocego
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
div{
margin: 100px auto;
width: 200px;
height: 200px;
background:red;
transform:scale(1);
}
@keyframes autoSlide {
0%{transform: translateY(0);}
25%{transform: translateY(5px);}
50%{transform: translateY(0);}
75%{transform: translateY(-5px);}
100%{transform: translateY(0);}
}
.mobile_auto {
animation: autoSlide 2s linear infinite;
}
.mobile_auto:hover{
animation: none;
width:220px;
height:220px;
color:red;
/* transform:scale(1.1); */
transition-duration:1s;
}
</style>
</head>
<body>
<div class="mobile_auto">测试文字</div>
<script id="jsbin-source-css" type="text/css">div{
margin: 100px auto;
width: 200px;
height: 200px;
background:red;
transform:scale(1);
}
@keyframes autoSlide {
0%{transform: translateY(0);}
25%{transform: translateY(5px);}
50%{transform: translateY(0);}
75%{transform: translateY(-5px);}
100%{transform: translateY(0);}
}
.mobile_auto {
animation: autoSlide 2s linear infinite;
}
.mobile_auto:hover{
animation: none;
width:220px;
height:220px;
color:red;
/* transform:scale(1.1); */
transition-duration:1s;
}</script>
</body>
</html>
div{
margin: 100px auto;
width: 200px;
height: 200px;
background:red;
transform:scale(1);
}
@keyframes autoSlide {
0%{transform: translateY(0);}
25%{transform: translateY(5px);}
50%{transform: translateY(0);}
75%{transform: translateY(-5px);}
100%{transform: translateY(0);}
}
.mobile_auto {
animation: autoSlide 2s linear infinite;
}
.mobile_auto:hover{
animation: none;
width:220px;
height:220px;
color:red;
/* transform:scale(1.1); */
transition-duration:1s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment