diff --git a/contact.html b/contact.html index e61e4d4..cfe9336 100644 --- a/contact.html +++ b/contact.html @@ -53,12 +53,8 @@ - - - - + +
@@ -69,7 +65,7 @@
- +

@@ -127,8 +123,28 @@

+ +
+
+
服务资质
+
打造创新型停车场 轻松停车
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+ +
diff --git a/css/contact.css b/css/contact.css index c0184ea..7b263d4 100644 --- a/css/contact.css +++ b/css/contact.css @@ -180,4 +180,22 @@ font-weight:400; color:rgba(0,0,0,1); line-height:23px; -} \ No newline at end of file +} + +/* 荣誉 轮播*/ +.box{ + height: 260px; + overflow: hidden; + width: 1200px; + margin: 60px auto; + position: relative; +} +#roll{ + width: 200%; +} +#roll dd{ + width: 382px; + height: 260px; + float: left; + margin-right: 20px; +} diff --git a/images/cups-1.png b/images/cups-1.png new file mode 100644 index 0000000..fc3a027 --- /dev/null +++ b/images/cups-1.png diff --git a/images/cups-2.png b/images/cups-2.png new file mode 100644 index 0000000..1397e86 --- /dev/null +++ b/images/cups-2.png diff --git a/images/cups-3.png b/images/cups-3.png new file mode 100644 index 0000000..d71cbc9 --- /dev/null +++ b/images/cups-3.png diff --git a/images/cups-4.png b/images/cups-4.png new file mode 100644 index 0000000..b691465 --- /dev/null +++ b/images/cups-4.png diff --git a/images/cups-5.png b/images/cups-5.png new file mode 100644 index 0000000..bfda04d --- /dev/null +++ b/images/cups-5.png diff --git a/images/cups-6.png b/images/cups-6.png new file mode 100644 index 0000000..5496106 --- /dev/null +++ b/images/cups-6.png diff --git a/images/cups-7.png b/images/cups-7.png new file mode 100644 index 0000000..abf7fe5 --- /dev/null +++ b/images/cups-7.png diff --git a/images/cups-8.png b/images/cups-8.png new file mode 100644 index 0000000..bd95173 --- /dev/null +++ b/images/cups-8.png diff --git a/js/contact.js b/js/contact.js index 0c98187..645d17e 100644 --- a/js/contact.js +++ b/js/contact.js @@ -442,3 +442,198 @@ option = { // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); + + +/** + + * parallelRoll 左右无缝滚动 + + * boxName : 最外层盒子类名 + + * tagName : 滚动标签元素 + + * time : 滚动间隔时间 + + * direction : 滚动方向 right-->向右 left-->向左 + + * visual : 可视数 + + * prev : 上一张 + + * next : 下一张 + + * Date: 19-01-24 + + * */ + +(function($){ + + $.fn.parallelRoll = function(options){ + + var opts = $.extend({}, $.fn.parallelRoll.defaults, options); + + var _this = this; + + var l = _this.find(opts.tagName).length; + + var autoRollTimer; + + var flag = true; // 防止用户快速多次点击上下按钮 + + var arr = new Array(); + + /** + + * 如果当 (可视个数+滚动个数 >滚动元素个数) 时 为不出现空白停顿 将滚动元素再赋值一次 + + * 同时赋值以后的滚动元素个数是之前的两倍 2 * l. + + * */ + + if(opts.amount + opts.visual > l){ + + _this[0].innerHTML += _this[0].innerHTML; + + l = 2 * l; + + }else{ + + l = l; + + } + + var w = $(opts.tagName).outerWidth(true); //计算元素的宽度 包括补白+边框 + + _this.css({width: (l * w) + 'px'}); // 设置滚动层盒子的宽度 + + return this.each(function(){ + + _this.closest('.'+opts.boxName).hover(function(){ + + clearInterval(autoRollTimer); + + },function(){ + + switch (opts.direction){ + + case 'left': + + autoRollTimer = setInterval(function(){ + + left(); + + },opts.time); + + break; + + case 'right': + + autoRollTimer = setInterval(function(){ + + right(); + + },opts.time); + + break; + + default : + + alert('参数错误!'); + + break; + + } + + }).trigger('mouseleave'); + + $('.'+opts.prev).on('click',function(){ + + flag ? left() : ""; + + }); + + $('.'+opts.next).on('click',function(){ + + flag ? right() : ""; + + }); + + }); + + function left(){ + + flag = false; + + _this.animate({marginLeft : -(w*opts.amount)},1000,function(){ + + _this.find(opts.tagName).slice(0,opts.amount).appendTo(_this); + + _this.css({marginLeft:0}); + + flag = true; + + }); + + }; + + function right(){ + + flag = false; + + arr = _this.find(opts.tagName).slice(-opts.amount); + + for(var i = 0; i