Browse Source

动态变化

gesofts 3 years ago
parent
commit
43bda10efe
2 changed files with 15 additions and 1 deletions
  1. 14 1
      js/index.js
  2. 1 0
      styles/index.css

+ 14 - 1
js/index.js

@@ -31,9 +31,22 @@ PageIndex = function () {
         },
         },
         init :function (){
         init :function (){
             this.funLoadLineInfo();
             this.funLoadLineInfo();
-
             this.funLoadInOutStationInfo();
             this.funLoadInOutStationInfo();
+
+            this.funDealLiLefInfo();
+            var me = this;
+            $(window).resize(function(){
+                me.funDealLiLefInfo();
+            });
         },
         },
+
+        funDealLiLefInfo : function(){
+            let vleft = ($(window).width() - PageIndex.defaultOption.stationFlys.length * 32) / (PageIndex.defaultOption.stationFlys.length - 1);
+            vleft += PageIndex.defaultOption.stationFlys.length*0.5;
+            $(".bus-lzlist li+li").css({"margin-left":vleft});
+            $(".outStation").css({"left":vleft/2});
+        },
+
         funLoadLineInfo : function () {
         funLoadLineInfo : function () {
             var html = "";
             var html = "";
             for (let nItem = 0; nItem < PageIndex.defaultOption.stationFlys.length; nItem++){
             for (let nItem = 0; nItem < PageIndex.defaultOption.stationFlys.length; nItem++){

+ 1 - 0
styles/index.css

@@ -11,6 +11,7 @@ li{
 
 
 .bus-lzlist ol {
 .bus-lzlist ol {
     display: inline-block;
     display: inline-block;
+    padding-inline-start: 0px;
     position: relative
     position: relative
 }
 }