s3Slider - 效果炫丽的产品展示 [jQuery Plugin]

s3slider_example

 

 

 

 

 

 

 

 

 

 

 

 

s3Slider

jQuery s3Slider 就是一个效果非常棒的产品展示用 Plugin ,它让我们单纯使用 HTML 就能达到如同 Flash 般的动画效果,而且配合适当的 CSS 时,更能在展示产品呈现一流的设计感。

·                                 名称: s3Slider

·                                 官网: http://www.serie3.info/s3slider/

·                                 效果展示页: http://www.serie3.info/s3slider/demonstration.html

使用方法很简单,首先我们要先把需要的 JavaScript 加载,也就是 jQuery s3Slider 两个档案:

 

ContractedBlock.gif ExpandedBlockStart.gif Code
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/s3Slider.js" type="text/javascript"></script>

 

接下来就是简单的 HTML 页面,基本格式如下:

ContractedBlock.gif ExpandedBlockStart.gif Code
div id="s3slider">
   
<ul id="s3sliderContent">
      
<li class="s3sliderImage">
              
<img src="#" />
           
<span>Your text comes here</span>
      
</li>
      
<li class="s3sliderImage">
              
<img src="#" />
           
<span>Your text comes here</span>
      
</li>
      
<div class="clear s3sliderImage"></div>
   
</ul>
</div>

 

套用 s3Slider 效果的元素 ID 为会被当作内含元素其 id class 的前置字符串;例如 div#s3slider ,里面的 ul li id class 名称就要以 s3slider 开头,然后要再加上 Content Image 等关键词。

接下来是 CSS 的部份,你可以调整成你喜欢的格式:

 

ContractedBlock.gif ExpandedBlockStart.gif Code
s3slider { 
   width: 400px; /* important to be same as image width */ 
   height: 300px; /* important to be same as image height */
   position: relative; /* important */
   overflow: hidden; /* important */
}
 
#s3sliderContent {
   width: 400px; /* important to be same as image width or wider */
   position: absolute; /* important */
   top: 0; /* important */
   margin-left: 0; /* important */
}
 
.s3sliderImage {
   float: left; /* important */
   position: relative; /* important */
   display: none; /* important */
}
 
.s3sliderImage span {
   position: absolute; /* important */
   left: 0;
   font: 10px/15px Arial, Helvetica, sans-serif;
   padding: 10px 13px;
   width: 374px;
   background-color: #000;
   filter: alpha(opacity=70); /* here you can set the opacity of box with text */
   -moz-opacity: 0.7; /* here you can set the opacity of box with text */
   -khtml-opacity: 0.7; /* here you can set the opacity of box with text */
   opacity: 0.7; /* here you can set the opacity of box with text */
   color: #fff;
   display: none; /* important */
   top: 0;
 
   /*
          if you put
          top: 0;  -
&gt; the box with text will be shown at the top of the image 
          if you put
          bottom: 0;  -
&gt; the box with text will be shown at the bottom of the image
   */
}
 
.clear {
   clear: both;
}

最后,你只需要在 div#s3Slider 上套用 s3Slider Plugin 即可:

 

ContractedBlock.gif ExpandedBlockStart.gif Code
$(document).ready(function() { 
    $(
'#s3slider').s3Slider({ 
        timeOut: 
4000 
    });
});

 

效果就如同上面展示页所呈现的,是不是很简单呢?

结论

在讲求开发容易又要视觉效果一流的制作 Web 方法中,使用 jQuery 似乎已经是多数人所认同的最佳解决方案。而 s3Slider 更是利用了 jQuery 强大的延展性,为我们在 Web 产品展示上加了不少分数。而且 s3Slider 只需要简单的 HTML 结构,更让程序开发人员在套用程序代码上省事不少。因此我推荐这个 Plugin 给大家,希望大家能想出更多有趣的应用。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值