2016-08-15 7 views
-1

私は3つのdivを設定しました。左側に1つ、右側に2つずつ設定しました。divのJquery/CSSカルーセル/スライダーエフェクト

左のスライドのdivを左側から にして、右上のdivの1つが上に上がり、右のdivの1つが右からスライドするようにします。そのアニメーションの後

は、私は、以前のdivが来たポイントから来て、私は(別のコンテンツに)次のdiv要素 に同じことを行うための「onclickの」ボタンを押す次回を望んで終わっています。

私はdivの背景色を変更できましたが、コンテンツやアニメーションは変更できませんでした。

これまでのところ、これまで私が得たことです。

$(document).ready(function(){ 
 
    $('#next').click(function(){ 
 
    if ($('.active').next('.case').length) { 
 
     $('.active').removeClass('active') 
 
        .next('.case') 
 
        .addClass('active'); 
 
    } 
 
    }); 
 
    $('#prev').click(function(){ 
 
    if ($('.active').prev('.case').length) { 
 
     $('.active').removeClass('active') 
 
        .prev('.case') 
 
        .addClass('active'); 
 
    } 
 
    }); 
 
});
html,body,section{ 
 
\t margin: 0px; 
 
\t padding: 0px; 
 
\t width: 100%; 
 
\t height: 100%; 
 
} 
 

 
#next,#prev{ 
 
    position:fixed; 
 
    z-index:101; 
 
} 
 

 
#next{ 
 
    right:0px; 
 
} 
 

 
#prev{ 
 
    left:0px; 
 
} 
 

 
#t1{ 
 
    float:left; 
 
    height:100%; 
 
    width:43%; 
 
    background-color: #c92639; 
 
     position: absolute; 
 
    left: 0px; 
 
    
 
    
 
} 
 

 
#logo >h1{ 
 
\t color: white; 
 
} 
 

 
#logo >h3{ 
 
\t  width: 58%; 
 
    margin: 0 auto; 
 

 
} 
 
#t2,#t3{ 
 
height: 50%; 
 
    width: 57%; 
 
    margin-left: auto; 
 
    margin-right: 0px; 
 
} 
 

 
#t3{ 
 
     position: absolute; 
 
    right: 0px; 
 
    bottom: 0px; 
 
    background-color: #c8c8c8; 
 
} 
 
#t2{ 
 
\t background-color: white; 
 
     position: absolute; 
 
    right: 0px; 
 
    top: 0px; 
 
} 
 

 
#t2 >img{ 
 
\t margin-top: 11%; 
 
} 
 

 
#logo{ 
 
\t margin-top: 40%; 
 
} 
 

 
#t3>ul{ 
 
\t display: inline-table; 
 
\t width: 80%; 
 
\t margin: 0 auto; 
 
\t margin-top: 50px; 
 
} 
 

 
#t3>ul>li{ 
 
\t display: inline-table; 
 
\t width: 33%; 
 

 
} 
 

 
#t3>ul>li>div>img{ 
 
\t width: 53%; 
 
    margin-top: 25%; 
 
} 
 

 
#home{ 
 
\t display: none !important; 
 
} 
 

 
#circle1,#circle2,#circle3{ 
 
    border-radius: 128px; 
 
    width: 150px; 
 
    height: 150px; 
 
    margin: 0 auto; 
 
    box-shadow: 10px 10px 5px #888888; 
 
} 
 

 
#circle1{ 
 
\t background: #32325f; 
 
} 
 

 
#circle2{ 
 
\t background: white; 
 
} 
 

 
#circle3{ 
 
\t background: #ef9d34; 
 
} 
 

 
.active{ 
 
    display:initial !important; 
 
    z-index:100; 
 
    
 
} 
 

 
#case{ 
 
    display:none; 
 
    position:absolute; 
 
    top:0px; 
 
    height: 100%; 
 
    width: 100%; 
 
    z-index:99; 
 
} 
 

 
.stern1{ 
 
    background:blue; 
 
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" 
 
      integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<div id="next"> 
 
    <h1>next</h1> 
 
</div> 
 
<div id="prev"> 
 
    <h1>prev</h1> 
 
</div> 
 

 
<div id="case" class="case active"> 
 
<div id="t1" class="tcee1"> 
 
     <div id="logo"><img src="img/cee.png" id="cee"> 
 
      <div id="underline"></div> 
 
      <br> 
 
      <h1>BRINGING AN OFFLINE ENCOUNTER TO AN ONLINE RELATION</h1><br> 
 
      <h3>Every day Cee-Platform helps their customers to build a bridge between their offline and online marketing challenges.</h3> 
 
     </div> 
 
    </div> 
 
    
 
    <div id="t2" class="case tcee2"> 
 
     <img src="img/ceedev.png"> 
 
    </div> 
 
    <div id="t3" class="tcee3"> 
 
     <ul> 
 
      <li> 
 
       <div id="circle1"> 
 
       <img src="img/computer.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>Responsiv</h2><br> 
 
       <p>My expierences with developing websites has learned me to make them structualy responsive from the ground up making it accesible for all platforms</p> 
 
      </li> 
 
      <li> 
 
       <div id="circle2"> 
 
       <img src="img/g.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>SEO</h2><br> 
 
       <p>Optimizing your website to result with high results on googles googles list</p>    
 
      </li> 
 
      <li> 
 
       <div id="circle3"> 
 
       <img src="img/hand.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>Storytelling</h2><br> 
 
       <p>With every website you want to tell a story, it doens't matter if you want to tell your visitor how aswesome your compeny or how important your goal is. I'll make it the best one out there</p> 
 
      </li> 
 
     </ul> 
 
    </div> 
 
</div> 
 

 
<div id="case" class="case"> 
 
<div id="t1" class="tstern1" style="background:blue;"> 
 
     <div id="logo"><img src="img/cee.png" id="cee"> 
 
      <div id="underline"></div> 
 
      <br> 
 
      <h1>BRINGING AN OFFLINE ENCOUNTER TO AN ONLINE RELATION</h1><br> 
 
      <h3>Every day Cee-Platform helps their customers to build a bridge between their offline and online marketing challenges.</h3> 
 
     </div> 
 
    </div> 
 
    <div id="t2" class="tstern2"> 
 
     <img src="img/ceedev.png"> 
 
    </div> 
 
    <div id="t3" class="tstern3"> 
 
     <ul> 
 
      <li> 
 
       <div id="circle1"> 
 
       <img src="img/computer.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>Responsiv</h2><br> 
 
       <p>My expierences with developing websites has learned me to make them structualy responsive from the ground up making it accesible for all platforms</p> 
 
      </li> 
 
      <li> 
 
       <div id="circle2"> 
 
       <img src="img/g.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>SEO</h2><br> 
 
       <p>Optimizing your website to result with high results on googles googles list</p>    
 
      </li> 
 
      <li> 
 
       <div id="circle3"> 
 
       <img src="img/hand.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>Storytelling</h2><br> 
 
       <p>With every website you want to tell a story, it doens't matter if you want to tell your visitor how aswesome your compeny or how important your goal is. I'll make it the best one out there</p> 
 
      </li> 
 
     </ul> 
 
    </div> 
 
</div> 
 

 
<div id="case" class="case"> 
 
<div id="t1" class="tstern1" style="background:black;"> 
 
     <div id="logo"><img src="img/cee.png" id="cee"> 
 
      <div id="underline"></div> 
 
      <br> 
 
      <h1>BRINGING AN OFFLINE ENCOUNTER TO AN ONLINE RELATION</h1><br> 
 
      <h3>Every day Cee-Platform helps their customers to build a bridge between their offline and online marketing challenges.</h3> 
 
     </div> 
 
    </div> 
 
    <div id="t2" class="tstern2"> 
 
     <img src="img/ceedev.png"> 
 
    </div> 
 
    <div id="t3" class="tstern3"> 
 
     <ul> 
 
      <li> 
 
       <div id="circle1"> 
 
       <img src="img/computer.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>Responsiv</h2><br> 
 
       <p>My expierences with developing websites has learned me to make them structualy responsive from the ground up making it accesible for all platforms</p> 
 
      </li> 
 
      <li> 
 
       <div id="circle2"> 
 
       <img src="img/g.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>SEO</h2><br> 
 
       <p>Optimizing your website to result with high results on googles googles list</p>    
 
      </li> 
 
      <li> 
 
       <div id="circle3"> 
 
       <img src="img/hand.png"> 
 
       </div> 
 
       <br> 
 
       <div id="underline"></div> 
 
       <h2>Storytelling</h2><br> 
 
       <p>With every website you want to tell a story, it doens't matter if you want to tell your visitor how aswesome your compeny or how important your goal is. I'll make it the best one out there</p> 
 
      </li> 
 
     </ul> 
 
    </div> 
 
</div>

+0

?より具体的には – Lucio

+0

アクティブクラスを次のdivに渡すことから始めてください。しかし、前のdivに渡したいと思います。私だけがどのように考えているのかわかりません – Salman

答えて

0

私のためにこの簡単なチュートリアルで、その加工した上質を見て、あなたは同様に改善/追加することができます。どの部分が動作しない

simple javascript slideshow

+0

このリンクは質問に答えるかもしれませんが、答えの本質的な部分をここに含めて参考にしてください。リンクされたページが変更された場合、リンクのみの回答は無効になることがあります – jmattheis