زمان جاری : جمعه 06 آذر 1405 - 8:47 بعد از ظهر
نام کاربری : پسورد : یا عضویت | رمز عبور را فراموش کردم



ارسال پاسخ
تعداد بازدید 139
نویسنده پیام
admin آفلاین


ارسال‌ها : 240
عضویت: 29 /3 /1391
سن: 17
تشکرها : 121
تشکر شده : 306
اسلایدر تصویر همراه متن

دمو

این کد را

کد:

<script type="text/javascript" src="http://mmilada.persiangig.com/POST/effect/jquery-1.4.min.js"></script>

<script type="text/javascript" src="http://mmilada.persiangig.com/POST/effect/jquery.easing.1.3.js"></script>

<script>

$(document).ready(function() {

   //if mouse over and mouse out

   $('.eff').hover(

   function () {

       value = $(this).find('img').outerHeight() * -1;

       //for left/right if you have different width and height,

       //commented out because we are using up/down in this example

       //value = $(this).find('img').outerWidth() * -1);

       

       //animate the image

       // you can change the sliding direction by changing bottom to left, right or top

       // if you changed this, you will have to change the position of the hover out as well

       $(this).find('img').stop().animate({bottom: value} ,{duration:500, easing: 'easeOutBounce'});    

       

   },

   function () {

       

       //reset the image

       // the position property (bottom), it must be same with the on in the mouseover

       $(this).find('img').stop().animate({bottom:0} ,{duration:500, easing: 'easeOutBounce'});    

   

   });

   

   //if user clicked on the thumbnail

   $('.eff').click(function () {    

       //grab and execute the first link in the thumbnail

       window.location = $(this).find('a:first').attr('href');

   });

   

});

</script>

<style>

body {

   font-family:arial;    

}

.eff {

   

   /* the image size is 126x126, it's adjusted to fit the border as well*/

   width:136px;

   height:136px;

   /* important, allow the children object to move inside its parent obj */

   position:relative;    

   /* important, it hides the moved image */

   overflow:hidden;

   

   /* with the clear class, make it into 3 x 3 layout */

   float:left;

   

   /* IE float bug fix */

   display:inline;

   

   /* styling */

   margin:8px;

   font-size:12px;

}

.eff img {

   display:block;

   width:126px;

   height:126px;

   

   /* styling */

   text-decoration:none;

   border:4px solid #ccc;

   background:#ddd;

   /* important, it allows this obj to move by jquery */

   position:absolute;

   

   /* make sure it appears above the caption */

   z-index:500;

   

   cursor:pointer; cursor:hand;

}

.eff .caption {

   /* should be the same size with the image */

   width:126px;

   height:126px;

   

   /* styling */

   background:#333;

   border:4px solid #ccc;

   color:#eee;

   

   /* set the position to 0, 0 and appear under the image */

   position:absolute;

   top:0; left:0;

   z-index:0;

}

/* extra styling*/

.eff .caption a.header {

   margin:10px 5px 5px 5px;

   display:block;

   font-size:14px;    

   font-weight:700;

   color:#4ed7f4;

}

.eff .caption p {

   margin:5px;    

}

.clear {clear:both}

</style>

قبل از تگ

کد:
  </head>    

قرار دهید

و این کد را هم جایی بذارید که میخواهید اسلایدر نمایش داده بشه

کد:

<div class="eff">

<img src="http://mmilada.persiangig.com/POST/effect/1.jpg" alt="Test 1" title="" width="126" height="126" />

<div class="caption"><a href="http://pcalfa.com/" class="header">PCALFA</a><p>کداز فارس تمپ،آپلود و :ميلاد<a href="test">asd</a></p></div>

</div>

<div class="eff">

<img src="http://mmilada.persiangig.com/POST/effect/2.jpg" alt="Test 1" title="" width="126" height="126" />

<div class="caption"><a href="http://pcalfa.com/" class="header">PCALFA</a><p>به انجمن پي سي آلفا خوش آمديد!</p></div>

</div>

<div class="eff">

<img src="http://mmilada.persiangig.com/POST/effect/3.jpg" alt="Test 1" title="" width="126" height="126" />

<div class="caption"><a href="http://pcalfa.com/" class="header">PCALFA</a><p>به انجمن پي سي آلفا خوش آمديد!</p></div>

</div>

<p id="debug"></p>


سه شنبه 03 مرداد 1391 - 20:02
نقل قول این ارسال در پاسخ
تشکر شده: 2 کاربر از admin به خاطر این مطلب مفید تشکر کرده اند: mazamani & sadegh18 &
ارسال پاسخ
پرش به انجمن :

theme designed for MyBB | RTL by MyBBIran.com