goods_guesslike.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <style type="text/css">
  2. .goods-guess-like { border: solid 1px #EEE; margin: 0 auto 20px auto;}
  3. .goods-guess-like .title { font: bold 14px/20px "microsoft yahei"; color: #666; padding: 8px 19px; border-bottom: solid 1px #EEE;}
  4. .goods-guess-like .content{position: relative;overflow: hidden}
  5. .goods-guess-like .content li{width:25%;float:left;position:relative}
  6. .goods-guess-like .goods-pic { width: 200px; height: 200px; margin: 15px auto 0 auto;}
  7. .goods-guess-like .goods-pic a { line-height: 0; text-align: center; vertical-align: middle; display: table-cell; *display: block; width: 200px; height: 200px; padding: 0; overflow: hidden;}
  8. .goods-guess-like .goods-pic a img { max-width: 200px; max-height: 200px; margin-top:expression(200-this.height/2); *margin-top:expression(100-this.height/2)/*IE6,7*/;}
  9. .goods-guess-like .goods-info { width: 200px; margin: 5px auto 15px auto;}
  10. .goods-guess-like .goods-info dt { line-height: 18px; height: 36px; overflow: hidden;}
  11. .goods-guess-like .goods-info dd { font: bold 12px/20px Verdana; color: #C00;}
  12. .goods-guess-like .goods-info dd em { font-size: 14px; font-weight: 600; margin: 0 4px;}
  13. .goods-guess-like .goods-promotion { color: #FFFFFF;text-align: center; width: 35px; height: 35px; padding-top: 10px;padding-right: 17px; position: absolute; top: 5px; right: 5px; z-index: 2;background: #f42424;border-bottom-left-radius: 50%;}
  14. .goods-guess-like .goods-promotion span{position:relative;z-index:2;font-weight:700;height:35px;line-height:35px;display:block;}
  15. .goods-guess-like .noguess { color: #AAA; text-align: center; padding: 50px 0;}
  16. /* 图片滚动
  17. -------------------------------------------*/
  18. .ds-carousel-prev-horizontal,
  19. .ds-carousel-next-horizontal {font-size: 16px;color:#ddd; width: 9px; height: 16px; padding: 10px 13px; position: absolute; z-index: 9; top: 40%; cursor: pointer;}
  20. .ds-carousel-prev-horizontal { left: 0; }
  21. .ds-carousel-prev-horizontal:hover,
  22. .ds-carousel-prev-horizontal:focus,
  23. .ds-carousel-prev-horizontal:active { color: #C00;}
  24. .ds-carousel-next-horizontal { right: 0; }
  25. .ds-carousel-next-horizontal:hover,
  26. .ds-carousel-next-horizontal:focus,
  27. .ds-carousel-next-horizontal:active { color: #C00}
  28. </style>
  29. <div class="goods-guess-like">
  30. <div class="title">{$Think.lang.guess_your_favorite_baby}</div>
  31. <div class="content">
  32. {notempty name="goodslist"}
  33. <ul id="mycarousel" class="ds-carousel-skin">
  34. {foreach name="goodslist" item="v"}
  35. <li>
  36. <div class="goods-pic">
  37. <a href="{:url('Goods/index',['goods_id'=>$v.goods_id])}" target="_blank">
  38. <img src="{:goods_cthumb($v.goods_image)}">
  39. </a>
  40. </div>
  41. {if $v.goods_promotion_type == 1}
  42. <div class="goods-promotion"><span>{$Think.lang.snap_up_goods}</span></div>
  43. {elseif $v.goods_promotion_type == 2}
  44. <div class="goods-promotion"><span>{$Think.lang.limited_time_discount}</span></div>
  45. {/if}
  46. <dl class="goods-info">
  47. <dt><a href="{:url('Goods/index',['goods_id'=>$v.goods_id])}" title="{$v.goods_name}" target="_blank">{$v.goods_name}</a></dt>
  48. <dd>
  49. <div>¥<em>{:ds_price_format($v.goods_promotion_price)}</em></div>
  50. </dd>
  51. </dl>
  52. </li>
  53. {/foreach}
  54. </ul>
  55. <div class="ds-carousel-prev ds-carousel-prev-horizontal iconfont" style="display: block;">&#xe619;</div>
  56. <div class="ds-carousel-next ds-carousel-next-horizontal iconfont" style="display: block;">&#xe618;</div>
  57. {else /}
  58. <div class="noguess">{$Think.lang.no_goods_recommended}</div>
  59. {/notempty}
  60. </div>
  61. </div>
  62. <script src="{$Think.PLUGINS_SITE_ROOT}/jquery.SuperSlide.2.1.1.js"></script>
  63. <script type="text/javascript">
  64. $(function(){
  65. jQuery(".goods-guess-like").slide({mainCell:".content ul",prevCell:".ds-carousel-prev",nextCell:".ds-carousel-next",effect:"left",autoPlay:true,vis:4});
  66. });
  67. </script>