Browse Source

产品中心

gzb
guozhongbo 1 year ago
parent
commit
f02a12321e
4 changed files with 63 additions and 51 deletions
  1. 6
    0
      css/about.css
  2. 8
    8
      css/product.css
  3. 36
    25
      js/product.js
  4. 13
    18
      sections/product.html

+ 6
- 0
css/about.css View File

137
   padding: 0 0.1rem;
137
   padding: 0 0.1rem;
138
   box-sizing: border-box;
138
   box-sizing: border-box;
139
 }
139
 }
140
+.area_fs:hover{
141
+  cursor: pointer;
142
+    border-radius: 0.04rem;
143
+    box-shadow: 0 0 0.12rem #0000001a;
144
+    transform: translate(0, -4px);
145
+}
140
 .area_fs img {
146
 .area_fs img {
141
   width: 0.88rem;
147
   width: 0.88rem;
142
   height: 0.88rem;
148
   height: 0.88rem;

+ 8
- 8
css/product.css View File

187
   margin-right: 0.2rem;
187
   margin-right: 0.2rem;
188
 }
188
 }
189
 .exam_item {
189
 .exam_item {
190
-  height: 1rem;
190
+  height: 0.9rem;
191
   margin-bottom: 0.2rem;
191
   margin-bottom: 0.2rem;
192
 }
192
 }
193
  
193
  
194
 .exam_item img{
194
 .exam_item img{
195
   width: 100%;
195
   width: 100%;
196
-  height: 1rem;
196
+  height: 100%;
197
 }
197
 }
198
 .exam_content {
198
 .exam_content {
199
-  width: 100%;
200
-  height: 6rem;
199
+  width: 7rem;
200
+  height: 5rem;
201
   position: relative;
201
   position: relative;
202
   overflow: hidden;
202
   overflow: hidden;
203
 }
203
 }
213
   height:  100%;
213
   height:  100%;
214
 }
214
 }
215
 .exam_content img {
215
 .exam_content img {
216
-  width: 9.8rem;
216
+  width: 100%;
217
   height:  100%;
217
   height:  100%;
218
-  object-fit: cover;
218
+  /* object-fit: cover; */
219
 }
219
 }
220
 .exam_slide{
220
 .exam_slide{
221
   position: relative;
221
   position: relative;
367
   position: relative;
367
   position: relative;
368
 }
368
 }
369
 .ques_item{
369
 .ques_item{
370
-  width: 2.4rem;
370
+  width: 2rem;
371
   position: absolute;
371
   position: absolute;
372
 }
372
 }
373
 .ques_left{
373
 .ques_left{
374
  top: 4rem;
374
  top: 4rem;
375
- left: 2.4rem;
375
+ left: 2.5rem;
376
 }
376
 }
377
 .ques_centre {
377
 .ques_centre {
378
   top: 2.2rem;
378
   top: 2.2rem;

+ 36
- 25
js/product.js View File

2
   $(".header_root").load("./comm/header.html");
2
   $(".header_root").load("./comm/header.html");
3
   $(".footer_root").load("./comm/footer.html");
3
   $(".footer_root").load("./comm/footer.html");
4
   //获取元素
4
   //获取元素
5
-  var divheight = $(".exam_one").height() - 70;
5
+  var divheight = $(".exam_one").height();
6
   var container = $(".exam_container");
6
   var container = $(".exam_container");
7
   var list = $(".show_exam");
7
   var list = $(".show_exam");
8
   var buts = $(".exam_item");
8
   var buts = $(".exam_item");
9
-  var index = 1; //存放当前显示的图片的下标
10
-  var imgnum = 3; // 图片数量
11
-  var len = 1; //显示数量
9
+  var index = 0; //存放当前显示的图片的下标
12
   var interval = 5000; //位移时间间隔
10
   var interval = 5000; //位移时间间隔
13
   var timer;
11
   var timer;
14
 
12
 
25
     //   offset = "-=" + Math.abs(offset);
23
     //   offset = "-=" + Math.abs(offset);
26
     // }
24
     // }
27
     offset = "-=" + Math.abs(offset);
25
     offset = "-=" + Math.abs(offset);
28
-    if (index == 6) {
29
-      index = 1;
26
+    if (index == 5) {
27
+      index = 0;
30
       offset = 0;
28
       offset = 0;
31
-      console.log("最后一个");
32
     }
29
     }
30
+    showButton();
33
     console.log("当前索引", index, top, offset);
31
     console.log("当前索引", index, top, offset);
34
     list.animate({ top: offset }, 300, function () {
32
     list.animate({ top: offset }, 300, function () {
35
       if (top > -200) {
33
       if (top > -200) {
36
       }
34
       }
37
     });
35
     });
38
   }
36
   }
37
+  var imglist = [
38
+    {
39
+      blue: "../img/product/mtblue.png",
40
+      grey: "../img/product/mtgrey.png"
41
+    },
42
+    {
43
+      blue: "../img/product/zdblue.png",
44
+      grey: "../img/product/zdgrey.png"
45
+    },
46
+    {
47
+      blue: "../img/product/ydblue.png",
48
+      grey: "../img/product/ydgrey.png"
49
+    },
50
+    {
51
+      blue: "../img/product/yyblue.png",
52
+      grey: "../img/product/yygrey.png"
53
+    },
54
+    {
55
+      blue: "../img/product/sjblue.png",
56
+      grey: "../img/product/sjgrey.png"
57
+    }
58
+  ];
39
   //亮起小圆点
59
   //亮起小圆点
40
   function showButton() {
60
   function showButton() {
41
-    console.log("亮起小圆点", index);
42
-    //当前图片的小圆点亮起,其他小圆点不亮
43
-    buts
44
-      .eq(index - 1)
45
-      .addClass("active")
46
-      .siblings()
47
-      .removeClass("active");
61
+    var html = "";
62
+    buts.each(function (idx, item) {
63
+      if (idx == index) {
64
+        $(this).html(`<img src="${imglist[idx].blue}" />`);
65
+      } else {
66
+        $(this).html(`<img src="${imglist[idx].grey}" />`);
67
+      }
68
+    });
48
   }
69
   }
49
-  console.log(divheight);
50
   // 鼠标离开图片区域时,轮播继续
70
   // 鼠标离开图片区域时,轮播继续
51
   function play() {
71
   function play() {
52
-    console.log("鼠标离开");
53
     timer = setTimeout(function () {
72
     timer = setTimeout(function () {
54
       animate(divheight);
73
       animate(divheight);
55
       play();
74
       play();
58
 
77
 
59
   //鼠标进入图片区域时,停止轮播
78
   //鼠标进入图片区域时,停止轮播
60
   function stop() {
79
   function stop() {
61
-    console.log("鼠标进入");
62
     if (timer) {
80
     if (timer) {
63
       clearTimeout(timer);
81
       clearTimeout(timer);
64
       timer = null;
82
       timer = null;
67
   // 点击事件
85
   // 点击事件
68
   buts.each(function () {
86
   buts.each(function () {
69
     $(this).bind("click", function () {
87
     $(this).bind("click", function () {
70
-      // 判断当前是否在进行动画
71
-      if (list.is(":animated") || $(this).attr("class") == "on") {
72
-        return;
73
-      }
74
       var myIndex = parseInt($(this).attr("index"));
88
       var myIndex = parseInt($(this).attr("index"));
75
       if (myIndex == index) {
89
       if (myIndex == index) {
76
         return;
90
         return;
77
       }
91
       }
78
-      //计算偏移量
79
-      var offset = (0 - divwidth) * (myIndex - index);
80
       index = myIndex;
92
       index = myIndex;
81
-      animates(offset);
82
       showButton();
93
       showButton();
83
-      stop();
84
     });
94
     });
85
   });
95
   });
86
   container.hover(stop, play);
96
   container.hover(stop, play);
87
 
97
 
88
   play();
98
   play();
99
+  showButton();
89
 });
100
 });

+ 13
- 18
sections/product.html View File

24
     <div class="pro_content">
24
     <div class="pro_content">
25
       <div class="piece">
25
       <div class="piece">
26
         <div class="area piece_item">
26
         <div class="area piece_item">
27
-          <div class="area_title">区域大数据平台</div>
27
+          <div class="area_titles">区域大数据平台</div>
28
           <div class="area_comm">
28
           <div class="area_comm">
29
             <p>
29
             <p>
30
               推动信息技术与教育教学场景深度融合,构建一体化的“互联网+教育”大平台
30
               推动信息技术与教育教学场景深度融合,构建一体化的“互联网+教育”大平台
95
       </div>
95
       </div>
96
       <div class="piece piece_color">
96
       <div class="piece piece_color">
97
         <div class="piece_item">
97
         <div class="piece_item">
98
-          <div class="area_title">校园教学平台</div>
98
+          <div class="area_titles">校园教学平台</div>
99
           <div class="area_comm">
99
           <div class="area_comm">
100
             <p>
100
             <p>
101
               通过教学辅助工具,提高教学工作效率;通过数据管理工具,促进资源合理配置;通过优化师生服务,提升教育教学水平。
101
               通过教学辅助工具,提高教学工作效率;通过数据管理工具,促进资源合理配置;通过优化师生服务,提升教育教学水平。
136
       </div>
136
       </div>
137
       <div class="piece">
137
       <div class="piece">
138
         <div class="piece_item">
138
         <div class="piece_item">
139
-          <div class="area_title">考试及测评系统</div>
139
+          <div class="area_titles">考试及测评系统</div>
140
           <div class="area_comm">
140
           <div class="area_comm">
141
             <p>
141
             <p>
142
               通过便捷的网上组题、命题、评价、智能评卷、数据自动统计分析等流程
142
               通过便捷的网上组题、命题、评价、智能评卷、数据自动统计分析等流程
149
           <div class="exam_lbt">
149
           <div class="exam_lbt">
150
             <div class="exam_container">
150
             <div class="exam_container">
151
               <div class="exam_pagination">
151
               <div class="exam_pagination">
152
-                <div data-index="1" class="exam_item">
153
-                  <img src="../img/product/mtblue.png" />
152
+                <div index="0" class="exam_item active">
153
+                  <img src="../img/product/mtgrey.png" />
154
                 </div>
154
                 </div>
155
-                <div data-index="2" class="exam_item">
156
-                  <img src="../img/product/zdblue.png" />
155
+                <div index="1" class="exam_item">
156
+                  <img src="../img/product/zdgrey.png" />
157
                 </div>
157
                 </div>
158
-                <div data-index="3" class="exam_item">
159
-                  <img src="../img/product/ydblue.png" />
158
+                <div index="2" class="exam_item">
159
+                  <img src="../img/product/ydgrey.png" />
160
                 </div>
160
                 </div>
161
-                <div data-index="4" class="exam_item">
162
-                  <img src="../img/product/yyblue.png" />
161
+                <div index="3" class="exam_item">
162
+                  <img src="../img/product/yygrey.png" />
163
                 </div>
163
                 </div>
164
-                <div data-index="5" class="exam_item">
165
-                  <img src="../img/product/sjblue.png" />
164
+                <div index="4" class="exam_item">
165
+                  <img src="../img/product/sjgrey.png" />
166
                 </div>
166
                 </div>
167
               </div>
167
               </div>
168
               <div class="exam_content">
168
               <div class="exam_content">
169
                 <div class="show_exam">
169
                 <div class="show_exam">
170
                   <div class="exam_slide">
170
                   <div class="exam_slide">
171
-                    <span>1</span>
172
                     <img class="exam_one" src="../img/product/mtznh.png" />
171
                     <img class="exam_one" src="../img/product/mtznh.png" />
173
                   </div>
172
                   </div>
174
                   <div class="exam_slide">
173
                   <div class="exam_slide">
175
-                    <span>2</span>
176
                     <img src="../img/product/zdqss.png" />
174
                     <img src="../img/product/zdqss.png" />
177
                   </div>
175
                   </div>
178
                   <div class="exam_slide">
176
                   <div class="exam_slide">
179
-                    <span>3</span>
180
                     <img src="../img/product/ydsss.png" />
177
                     <img src="../img/product/ydsss.png" />
181
                   </div>
178
                   </div>
182
                   <div class="exam_slide">
179
                   <div class="exam_slide">
183
-                    <span>4</span>
184
                     <img src="../img/product/yyxlg.png" />
180
                     <img src="../img/product/yyxlg.png" />
185
                   </div>
181
                   </div>
186
                   <div class="exam_slide">
182
                   <div class="exam_slide">
187
-                    <span>5</span>
188
                     <img src="../img/product/sjfxq.png" />
183
                     <img src="../img/product/sjfxq.png" />
189
                   </div>
184
                   </div>
190
                 </div>
185
                 </div>

Loading…
Cancel
Save