2014.09.08
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0017.jpg" class="open"
title="サンプル1のタイトル">サンプル1のリンク</a>
<script type="text/javascript">
$(function(){
$("a.open").colorbox({maxWidth:"90%", maxHeight:"90%"});
$("a.open600").colorbox({width:"628px", height:"512px"});
$("a.open50p").colorbox({width:"50%", height:"50%"});
});
</script>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033.jpg" class="open600"
title="サンプル1"><img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033s.jpg"
alt="サンプル1" border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032.jpg" class="open50p"
title="サンプル2"><img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032s.jpg"
alt="サンプル2" border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0034.jpg" class="open"
title="サンプル3"><img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0034s.jpg"
alt="サンプル3" border="0" /></a>
<script type="text/javascript">
$(function(){
$("a.elastic").colorbox({transition:"elastic",speed:1500,opacity:0.9});
$("a.fade").colorbox({transition:"fade",speed:1000,opacity:0.6});
$("a.none").colorbox({transition:"none",opacity:0.3});
});
</script>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033.jpg" class="elastic"
title="サンプル1">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033s.jpg" alt="サンプル1"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032.jpg" class="fade"
title="サンプル2">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032s.jpg" alt="サンプル2"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032.jpg" class="none"
title="サンプル3">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032s.jpg" alt="サンプル3"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033.jpg" class="open"
rel="group" title="サンプル1">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033s.jpg" alt="サンプル1"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032.jpg" class="open"
rel="group" title="サンプル2">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032s.jpg" alt="サンプル2"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0017.jpg" class="open"
rel="group" title="サンプル3">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0017s.jpg" alt="サンプル3"
border="0" /></a>
<script type="text/javascript">
$(function(){
$("a[rel='group1']").colorbox({speed:450,opacity:0.5});
});
</script>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033.jpg" rel="group1"
title="サンプル1">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033s.jpg" alt="サンプル1"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032.jpg" rel="group1"
title="サンプル2">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032s.jpg" alt="サンプル2"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0017.jpg" rel="group1"
title="サンプル3">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0017s.jpg" alt="サンプル3"
border="0" /></a>
<script type="text/javascript">
$(function(){
$("a[rel='group1']").colorbox({speed:450,opacity:0.5});
$("a[rel='group2']").colorbox({opacity:0.8});
});
</script>
<script type="text/javascript">
$(function(){
$("a[rel='slide']").colorbox({slideshow:true,slideshowSpeed: 5000});
});
</script>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033.jpg" rel="slide"
title="サンプル1">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0033s.jpg" alt="サンプル1"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032.jpg" rel="slide"
title="サンプル2">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0032s.jpg" alt="サンプル2"
border="0" /></a>
<a href="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0017.jpg" rel="slide"
title="サンプル3">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0017s.jpg" alt="サンプル3"
border="0" /></a>
<a href="http://youtu.be/b4VW1H_tcYM" target="_blank" title="リンクのタイトル(任意)">
クリックすると別ウインドウで動画ページが開きます</a>
<iframe width="560" height="315" src="//www.youtube.com/embed/b4VW1H_tcYM" frameborder="0"
allowfullscreen></iframe>
「Colorbox」を使った場合のサンプル →
例としてサムネイルを使ってます。(もちろんテキストだけでも可能)
上記の通常通りのやり方とは違い、別ページを開いたり
ページ内に動画を直接表示するスペースを確保する必要が無いので
上手く使うと、ページのレイアウトや動画の見せ方の幅が広がります。
但し、これだけでは動画である事が分からないので、
動画である事を明記するか、サムネイルを使う場合は工夫して
<script type="text/javascript">
$(function(){
$("a.youtube").colorbox({iframe:true, innerWidth:600, innerHeight:400});
});
</script>
<a href="http://www.youtube.com/embed/b4VW1H_tcYM" class="youtube"
title="「Colorbox」を使って動画を表示">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0035.gif"
alt="サムネイルの画像タイトル" border="0" /></a>
<script type="text/javascript">
$(function(){
$("a.website").colorbox({iframe:true, width:"80%", height:"80%"});
});
</script>
<a href="http://interest2014.blog.fc2.com/" class="website" rel="group2"
title="INTEREST(インタレスト) トップページ">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0036.gif"
alt="サムネイルの画像タイトル" border="0" /></a>
<a href="http://interest2014.blog.fc2.com/?all" class="website" rel="group2"
title="INTEREST(インタレスト) カテゴリ別全記事一覧">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0036.gif"
alt="サムネイルの画像タイトル" border="0" /></a>
<a href="http://interest2014.blog.fc2.com/blog-date-201409.html" class="website"
rel="group2" title="INTEREST(インタレスト) 2014年09月の記事">
<img src="http://blog-imgs-68.fc2.com/i/n/t/interest2014/blog0036.gif"
alt="サムネイルの画像タイトル" border="0" /></a>
- TrackBack -
- Comment -
▼クリックすると配色が変更されます
このボタンの設置方法は こちら♪
2014.12.15
2014.12.09
2014.12.05
2014.12.04
2014.12.03
コメントの投稿
- Post a Comment -