TAGS: CloudCarousel | 画像 | 回転 | jQuery | プラグイン | MIT
Cloud Carouselは、マウスで複数の画像を360度グルグル回転させることのできるjQueryプラグインです。

動作環境


◇ 言語:JavaScript
◇ ライセンス:MIT
◇ ブラウザー:IE6-IE9, Firefox (V4含む), Chrome, Opera, Safariなどのでブラウザーで検証済み



機能・特徴


◇ マウスで3D回転
◇ リフレクション(鏡反射)効果
◇ 軽量。わずか5KB(圧縮版)
◇ Slimboxなどのプラグインとのシームレス連携
◇ マウスホイールによる回転

使い方


1)JavaScriptライブラリ定義

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<!-- Load the CloudCarousel JavaScript file --> <script type="text/JavaScript" src="/js/cloud-carousel.1.0.0.js"></script>



2)初期化
<script>
$(document).ready(function(){
    // 
    $("#carousel1").CloudCarousel(
        {
            xPos: 128,
            yPos: 32,
            buttonLeft: $("#left-but"),  //左ボタン
            buttonRight: $("#right-but"),//右ボタン
            altBox: $("#alt-text"),
            titleBox: $("#title-text")
        }
    );
});

</script>



3)画像を表示するHTMLコンテンツ
        <!-- コンテナー定義 -->
        <div id = "carousel1" style="width:256px; height:128px;background:#000;overflow:scroll;">            
            <!-- すべての画像 -->
            <!-- 画像のリンクの追加も可能 -->
            <img class = "cloudcarousel" src="/images/carousel/flags/flag1.png" alt="Flag 1 Description" title="Flag 1 Title" />
            <img class = "cloudcarousel" src="/images/carousel/flags/flag2.png" alt="Flag 2 Description" title="Flag 2 Title" />
            <img class = "cloudcarousel" src="/images/carousel/flags/flag3.png" alt="Flag 3 Description" title="Flag 3 Title" />
            <img class = "cloudcarousel" src="/images/carousel/flags/flag4.png" alt="Flag 4 Description" title="Flag 4 Title" />
        </div>
        
        <!-- ボタン -->
        <input id="left-but"  type="button" value="Left" />
        <input id="right-but" type="button" value="Right" />
        
        <!-- 画像のalt、title表示する場所 -->
        <p id="title-text"></p>
        <p id="alt-text"></p>

.

Sponsored Link


有关作者
Syboos.jp編集長AJavaやオープンソース情報の執筆、Webサイトの開発や運営全般の業務に携わる。

Comments

用户名 (required)

Email (will not be published) (required)

URL

Evaluation