ホーム > タグ > animation
animation
画面を上下にスクロールさせるときにメニューも一緒についてくるフローティングメニュー
- 2009-09-09 (水)
- animation | jQuery | menu | navigation | scroll
- Comments: 0
- Trackbacks: 0
残像を残してスクロール jQuery Effect Spectrum
残像を残してスクロール jQuery Effect Spectrum
要素から要素へ移動させるときに、四角の残像を残して移動する。
移動先がわかりやすくていいです。

jQuery Effect Spectrum
- Comments: 0
- Trackbacks: 0
スライドドアエフェクト 画像が4分割に開く
Create a Stunning Sliding Door Effect with jQuery
jQueryとjQuery Easing.jsを使っています。
マウスオーバーで画像が4つに割れて背景が表示されます。
- Comments: 0
- Trackbacks: 0
画像が自動ドアのように分割してスライドanimate
マウスオーバーすると画像が自動ドアのように左右にスライドして背景を表示させます。
サンプルのhtml
<!--.box_containerサンプル-->
<div class='box_container'>
<div class='images_holder'>
<div class='image_div left'><img class='box_image' src='img/dammy.jpg' style='width:400px'/></div>
<div class='image_div right'><img class='box_image' src='img/dammy.jpg' style='width:400px'/></div>
<div class='clear'></div>
</div>
<!--START THE TEXT-->
Dreamweaverが開いた。
<!--END THE TEXT-->
</div>
css
.box_container {
position:relative;
/*画像のサイズ*/
width:400px;
height:320px;
overflow:hidden;
/*開いたときの背景*/
background:url(img/dw.jpg) no-repeat left top;
color:white;
}
.images_holder{
position:absolute;
}
.image_div {
position:relative;
overflow:hidden;
width:50%;
float:left;
}
.right img{
margin-left: -100%;
}
.clear{
clear:both;
}
javascript
<script type="text/javascript" src="jquery.js"></script>
jQueryを読み込んで
下のスクリプトを書きます。
<script type="text/javascript">
$(document).ready(function() {
//.box_container
$('.box_container').hover(function(){
var width = $(this).outerWidth() / 2;
$(this).find('.left').animate({ right : width },{queue:false,duration:300});
$(this).find('.right').animate({ left : width },{queue:false,duration:300});
}, function(){
$(this).find('.left').animate({ right : 0 },{queue:false,duration:300});
$(this).find('.right').animate({ left : 0 },{queue:false,duration:300});
});
});
</script>
jQuery Easing.jsも読み込むとeasing効果も追加できます。
サンプル2のjavascript
<script type="text/javascript">
$(document).ready(function() {
//easing.jsを使用↓
$('.box_container').hover(function(){
var width = $(this).outerWidth() / 2;
$(this).find('.left').animate({ right : width },{easing: 'easeOutBounce', queue:false,duration:1000});
$(this).find('.right').animate({ left : width },{easing: 'easeOutBounce', queue:false,duration:1000});
}, function(){
$(this).find('.left').animate({ right : 0 },{easing: 'easeOutBounce',queue:false,duration:1000});
$(this).find('.right').animate({ left : 0 },{easing: 'easeOutBounce',queue:false,duration:1000});
});
});
</script>
サンプル3のjavascript
<script type="text/javascript">
$(document).ready(function() {
//easing.jsを使用↓
$('.box_container').hover(function(){
var width = $(this).outerWidth() / 2;
$(this).find('.left').animate({ right : width },{easing: 'easeOutCirc', queue:false,duration:1100});
$(this).find('.right').animate({ left : width },{easing: 'easeOutCirc', queue:false,duration:1100});
}, function(){
$(this).find('.left').animate({ right : 0 },{easing: 'easeOutCirc',queue:false,duration:1100});
$(this).find('.right').animate({ left : 0 },{easing: 'easeOutCirc',queue:false,duration:1100});
});
});
</script>
- Comments: 0
- Trackbacks: 0
マウスオーバーで要素の透明度がアニメーションで変化
Sexy Opacity Animation with MooTools or jQuery

マウスオーバーしたときに要素の背景色の透明度がアニメーションで変わります。
Sexy Opacity Animation with MooTools or jQuery
- Comments: 0
- Trackbacks: 0
スムーススクロール jQuery Scroll to Top Control
スムーズにスクロールさせるjsはいろいろありますが、この jQuery Scroll to Top Controlは、スクロールしてページの上部へ戻る位置まで下にスクロールさせたとき、ページ上部へ戻るボタンが出てきます。
- Comments: 0
- Trackbacks: 0
Home > Tags > animation




