日期:2014-05-16 浏览次数:20393 次
<script type="text/javascript"> 都是封装好的代码 只要这个id lunbo放入最外围的div里面就可以执行 KISSY.use("switchable", function (S, Switchable) { new Switchable.Slide('#lunbo', { contentCls:'box', effect : 'fade' }); }); </script>
<!DOCTYPE HTML> <html> <head> <style type="text/css"> body,ul,li,p{ margin:0; padding:0; list-style:none;} #content,#page{width:100%;} .silde{position:relative;width:495px;height:280px;overflow:hidden;} .box{position:relative;} .silde .ks-switchable-nav {position: absolute;bottom: 5px;right: 5px;z-index: 99;} .silde .ks-switchable-nav li {float: left;width: 25px;height: 25px;line-height: 25px;margin-left: 3px;background-color: #e0e0e0;border: 1px solid #6b6b6b;color: #5a5a59;text-align: center;cursor: pointer;list-style: none;} .silde .ks-switchable-nav li.ks-active {width: 25px;height: 25px;line-height: 25px;margin-top: -1px;color:#6b6b6b;background-color:#323230; border:1px solid #6b6b6b;font-weight: bold;} </style> </head> <body> <div class="silde" id="lunbo" > <ul class="box"> <cms:custom title="轮播效果" group="轮播图片" fields="link:链接:href,img:图片[495*280]:string" defaultRow="2" row="10" name="dab69f6c-01f8-4474-a1a9-afaa9a27c16c"> #foreach($item in $customList) <li><a target="_blank" href="$!item.link"><img src="$!item.img" width="495" height="280" alt=""></a></li> #end </cms:custom> </ul> </div> </body> <script type="text/javascript"> KISSY.use("switchable", function (S, Switchable) { new Switchable.Slide('#lunbo', { contentCls:'box', effect : 'fade' }); }); </script>