s3Slider jQuery plugin

19.12.2008|Freebies, Tutoriale
s3Slider jQuery plugin

s3Slider jQuery plugin jest wtyczka, dziięki której możemy uzyskać efekt slideshow oparty na bibliotece jQuery. Obrazy zmieniają się w określonym czasie, a opisy pojawiają się na półprzezroczystym tle.

Demo: http://www.serie3.info/s3slider/demonstration.html

Instalacja:
1. należy pobrać jQuery ze strony oficjalnej
2. następnie ze strony autora s3Slider jQuery plugin nalezy ściągnąć pliki źródłowe
Pełna wersja (z przykładami zastosowania) (74kb)
Wersja nieskompresowana (4.12kb)
Wersja skompresowana (1.66kb)

Teraz w naszym pliku (przykładowo index.html) określamy w kodzie namiary na najpotrzebniejsze skrypty:

  1. <script src="js/jquery.js" type="text/javascript"></script>
  2. <script src="js/s3Slider.js" type="text/javascript"></script>

Przykładowy kod htmlowy z zastosowanym efektem s3Slider

  1. <div id="s3slider">
  2.    <ul id="s3sliderContent">
  3.       <li class="s3sliderImage">
  4.           <img src="#" />
  5.           <span>Your text comes here</span>
  6.       </li>
  7.       <li class="s3sliderImage">
  8.           <img src="#" />
  9.           <span>Your text comes here</span>
  10.       </li>
  11.       <div class="clear s3sliderImage"></div>
  12.    </ul>
  13. </div>

Kod CSS

  1. #s3slider {
  2.    width: 400px; /* important to be same as image width */
  3.    height: 300px; /* important to be same as image height */
  4.    position: relative; /* important */
  5.    overflow: hidden; /* important */
  6. }
  7.  
  8. #s3sliderContent {
  9.    width: 400px; /* important to be same as image width or wider */
  10.    position: absolute; /* important */
  11.    top: 0; /* important */
  12.    margin-left: 0; /* important */
  13. }
  14.  
  15. .s3sliderImage {
  16.    float: left; /* important */
  17.    position: relative; /* important */
  18.    display: none; /* important */
  19. }
  20.  
  21. .s3sliderImage span {
  22.    position: absolute; /* important */
  23.    left: 0;
  24.    font: 10px/15px Arial, Helvetica, sans-serif;
  25.    padding: 10px 13px;
  26.    width: 374px;
  27.    background-color: #000;
  28.    filter: alpha(opacity=70); /* here you can set the opacity of box with text */
  29.    -moz-opacity: 0.7; /* here you can set the opacity of box with text */
  30.    -khtml-opacity: 0.7; /* here you can set the opacity of box with text */
  31.    opacity: 0.7; /* here you can set the opacity of box with text */
  32.    color: #fff;
  33.    display: none; /* important */
  34.    top: 0;
  35.  
  36.    /*
  37.        if you put
  38.        top: 0; -> the box with text will be shown at the top of the image
  39.        if you put
  40.        bottom: 0; -> the box with text will be shown at the bottom of the image
  41.    */
  42. }
  43.  
  44. .clear {
  45.    clear: both;
  46. }

Inne dodatkowe uwagi dostępne na stronie oficjalnej plugina.

Podaj dalej :)

Dodaj swój komentarz:





Chcesz, aby koło Twojego komentarza pojawiła się Twoja ikona lub zdjęcie?
Kliknij tutaj i dowiedz się jak korzystać z Gravatarów!

O mnie

Agressiva

Programy:

  • Adobe Photoshop (znajomość bardzo dobra)
  • Adobe Illustrator (znajomość dobra)
  • Adobe Dreamweaver (znajomość bardzo dobra)
  • Adobe Lightroom (znajomość bardzo dobra)
  • Corel Draw (znajomość dobra)

Hobby

  • projektowanie stron www (webdesign i webmastering)
  • fotografia (makrofotografia, fotografia portretowa)
  • podróże (te bliskie i te dalekie)
  • rower (wszystko co związane z jednośladem)
FreshPixels - Agencja interaktywna Łódź - Projektowanie stron internetowych opartych o system WordPress.
Rowerowe Miasto - miejsca przyjazne rowerzystom w Łodzi - www.rowerowemiasto.info

Przyjaciele

  • Agata Kubis - fotoblog
  • Bartłomiej Szydłowski
  • Brodek - Utrwalacz chwili…
  • Graffika.pl
  • Michał Ziemak - TheMishaART - digital painting portfolio
  • Piotr Sajnog
  • Vivee.info - blog o webmasteringu, grafice i fotografii
  • Warstwy.com

Zagoń rower do roboty!

Copyright © 2012 Agressiva Blog. All rights reserved. Design by Water Design