tanxue 5 rokov pred
rodič
commit
d8dfa771ed

+ 42 - 0
src/assets/css/cus-website/cus-website-page.scss

@@ -275,6 +275,48 @@
         }
       }
     }
+
+    /* 行业资讯 */
+    .website-industry-information{
+      background: #F9FAFF;
+      padding-bottom: 96px;
+      // 轮播组件
+      .el-carousel{
+        margin-top: 56px;
+        .el-carousel__container{
+          height: 400px;
+        }
+
+      }
+      .el-carousel__item{
+        background: #FFFFFF;
+        border-radius: 8px;
+        .website-img-box{
+          width: 200px;
+          height: 400px;
+          background-repeat: no-repeat;
+          background-size: cover;
+          background-position: center;
+          transition: 0.3s;
+          float: left;
+        }
+        .website-content-box{
+          margin-left: 200px;
+          padding: 40px 32px;
+          h1{@include setFontStyle(4);color: rgba(0,0,0,0.85);margin-bottom: 24px;}
+          p{@include setFontStyle(-4);color: rgba(0,0,0,0.64);line-height: 24px;@include multi-line-ellipsis(9);min-height: 216px;margin-bottom: 24px;}
+          a{width: 132px;height: 32px;line-height:32px;display: inline-block;@include setFontStyle(-4);background: #2B5CFD;border-radius: 4px;color: rgba(255,255,255,0.85);text-align: center}
+        }
+      }
+      .el-carousel__item.is-active{
+        box-shadow: 0 4px 8px 0 rgba(214, 214, 214, 0.76);
+        .website-img-box{width: 400px;}
+        .website-content-box{
+          margin-left: 400px;
+          p{@include multi-line-ellipsis(9);}
+        }
+      }
+    }
   }
 }
 

+ 11 - 40
src/views/client/Index.vue

@@ -161,6 +161,17 @@
             </div>
         </div>
 
+        <!-- 行业资讯 -->
+        <div class="website-industry-information">
+            <h1 class="website-index-title">行业资讯</h1>
+            <el-carousel :interval="200000" type="card"  :autoplay="false" arrow="always">
+                <el-carousel-item v-for="item in topCarousels" :key="item">
+                    <div class="website-img-box" :style="{backgroundImage: 'url(' + item + ')'}"></div>
+                    <div class="website-content-box"><h1>企业为什么需要微课</h1><p>新时代人才的特点,移动互联网、智能手机的普及,企业环境的变革,都是推动微课迅猛发展的重要原因。</p><a>了解详情</a></div>
+                </el-carousel-item>
+            </el-carousel>
+        </div>
+
         <!-- 底部footer -->
         <div class="website-footer">
             <div class="website-container">
@@ -212,18 +223,6 @@
             </div>
         </div>
 
-        <!--<div class="mta-index">
-            <div class="block">
-                <el-carousel :interval="200000" type="card" height="400px" :autoplay="false" arrow="always">
-                    <el-carousel-item v-for="item in topCarousels" :key="item">
-                        <div style="width: 400px; height: 400px;">
-                            <img :src="item">
-                            <div><h1>企业为什么需要微课</h1><p>新时代人才的特点,移动互联网、智能手机的普及,企业环境的变革,都是推动微课迅猛发展的重要原因。</p></div>
-                        </div>
-                    </el-carousel-item>
-                </el-carousel>
-            </div>
-        </div>-->
     </div>
 </template>
 
@@ -308,31 +307,3 @@
         },
     };
 </script>
-<style>
-    .el-carousel__item img {
-        width: 50%;
-    }
-
-    .el-carousel__item.is-active img {
-        width: 100%;
-    }
-
-
-    .el-carousel__item {
-        color:       #475669;
-        font-size:   14px;
-        line-height: 200px;
-        margin:      0;
-        /*transform:scale(1)!important;*/
-    }
-
-    .el-carousel__item:nth-child(2n) {
-        background-color: #99A9BF;
-    }
-
-    .el-carousel__item:nth-child(2n+1) {
-        background-color: #D3DCE6;
-        /*transform:scale(1)!important;*/
-    }
-
-</style>