swiper.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/4/19
  6. * Time: 下午2:54
  7. */
  8. use frontend\assets\AppAsset;
  9. use yii\helpers\Html;
  10. AppAsset::addCss($this,Yii::$app->request->baseUrl."/overseas/js/lunbo/swiper-3.4.2.min.css");
  11. AppAsset::addScript($this,Yii::$app->request->baseUrl.'/overseas/js/lunbo/swiper-3.4.2.min.js');
  12. AppAsset::addScript($this,Yii::$app->request->baseUrl."/overseas/js/applyVerify.js");
  13. AppAsset::addScript($this,Yii::$app->request->baseUrl."/overseas/js/swiper.js");
  14. ?>
  15. <style>
  16. .view .swiper-slide .swiper_box img:hover{cursor: url(/overseas/img/fdtb.png), default;}
  17. .swiper-zoom-container>canvas, .swiper-zoom-container>img{
  18. /*width:700px; 2020-07-07注释 */
  19. max-width:none !important;
  20. max-height:none !important;
  21. /*object-fit: contain; */
  22. }
  23. .pc-slide {position:fixed;top:0;left:0;width: 100%;height:100%;display:none;z-index:1000;}
  24. .view{z-index:100;width:100%;height:90%;margin-top:2%;}
  25. .view .swiper-container {width:80%;height:100%;}
  26. .view .swiper-slide .swiper_box{width:100%;height:100%;margin:auto;overflow:hidden;}
  27. .view .arrow-left {background: url(/overseas/img/swiper/zuo13.png) no-repeat -11px 2px/ 47px 46px;position: fixed;left: 8%;top: 50%;margin-top: -25px;width: 28px;height:51px;z-index: 10;}
  28. .view .arrow-right {background: url(/overseas/img/swiper/you13.png) no-repeat -11px 2px/ 47px 46px;position: fixed;right: 8%;top: 50%;margin-top: -25px;width: 28px;height: 51px;z-index: 10;}
  29. .preview_box{position:fixed;z-index:10;width:100%;height:16%;margin-top:3%;bottom:0;}
  30. .preview {padding:5px 30px;width:auto;max-width:80%;margin:auto;margin-top: 10px;background:#FFF;border-radius:5px;overflow:hidden;
  31. position:absolute;top:0;left:50%;display:none;
  32. }
  33. .preview .swiper-container {width:100%;height: 82px;margin:auto;}
  34. .preview .swiper-wrapper.on{display:flex;align-items:center;justify-content:center;}
  35. .preview .swiper-slide {width: 87px;height: 82px;cursor:pointer;position:relative;}
  36. .preview .slide6 {width: 82px;}
  37. .preview .arrow-left {background: url(/overseas/img/swiper/feel3.png) no-repeat 10px 37px/ 9px 18px;position: absolute;left: 0; top: 0;width: 30px;height: 100%;z-index: 10;}
  38. .preview .arrow-right {background: url(/overseas/img/swiper/feel4.png) no-repeat 12px 37px/ 9px 18px;position: absolute;right: 0; top: 0;width: 30px;height: 100%;z-index: 10;}
  39. .preview img {width:95%;height:100%;}
  40. .preview .active-nav:before {content:"";display:block;width:95%;height:100%;position:absolute;top:0;left:0;background:url(/overseas/img/swiper/t01.png) no-repeat 0 0/ 100% 100%;}
  41. .pc_slide_bj{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(51, 51, 51, 0.7);}
  42. .pc_slide_gb{position:absolute;top:7%;right:7%;width:48px;height:48px;z-index:10}
  43. .pc_slide_gb img{width:100%;height:100%;}
  44. .pc_slide_fd{position:absolute;top:15%;right:7%;width:48px;height:48px;z-index:10}
  45. .pc_slide_fd img{width:100%;height:100%;}
  46. .preview_text{position:absolute;top:0;left:0;width:100%;text-align:center;}
  47. .preview_text span{padding:10px 10px;border-radius:0 0 5px 5px;background:#FFF;font-size:17px;color:#444;font-weight:600;}
  48. </style>
  49. <div class="pc-slide">
  50. <!-- <div class="pc_slide_bj"></div>
  51. <div class="view">
  52. <div class="swiper-container">
  53. <div class="pc_slide_gb"><img src="/overseas/img/swiper/ico_colke.png" alt=""></div>
  54. <a class="arrow-left" href="#"></a>
  55. <a class="arrow-right" href="#"></a>
  56. <div class="swiper-wrapper">
  57. <div class="swiper-slide">
  58. <div class="swiper_box">
  59. <div class="swiper-zoom-container"><img class="" src="http://pfghouse.pinfangw.com/housealbum/f189bd626c22227df78ca5d7a0c8321d.jpg/pfgwatermark" alt=""></div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="preview_box">
  66. <div class="preview">
  67. <a class="arrow-left" href="#"></a>
  68. <a class="arrow-right" href="#"></a>
  69. <div class="swiper-container">
  70. <div class="swiper-wrapper">
  71. <div class="swiper-slide">
  72. <img src="http://pfghouse.pinfangw.com/housealbum/f189bd626c22227df78ca5d7a0c8321d.jpg/pfgwatermark" alt="">
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div> -->
  78. </div>
  79. </body>
  80. </html>