Your Name 3 weeks ago
parent
commit
4fdaea1698
3 changed files with 77 additions and 9 deletions
  1. 3
    6
      template/pc/components/detail/cl.htm
  2. 53
    2
      template/pc/css/extend.css
  3. 21
    1
      template/pc/js/default.js

+ 3
- 6
template/pc/components/detail/cl.htm View File

@@ -146,15 +146,11 @@
146 146
         </div>
147 147
     </div>
148 148
 </div>
149
+
149 150
 <div class="part">
150 151
     <p class="tt"><span>产品介绍</span></p>
151 152
     <div class="items">
152
-        <div class="art-main">
153
-
154
-
155
-
156
-
157
-
153
+        <div class="art-main art-main-sp">
158 154
 
159 155
             {eyou:if condition='($is_mobile === false)'}
160 156
                 {$eyou.field.content_5}
@@ -166,6 +162,7 @@
166 162
                 {/eyou:empty}
167 163
             {/eyou:if}
168 164
 
165
+            <div class="btn-show btn-bg"><span>点击查看全文</span></div>
169 166
         </div>
170 167
     </div>
171 168
 </div>

+ 53
- 2
template/pc/css/extend.css View File

@@ -793,6 +793,7 @@
793 793
         min-width: 0px !important;
794 794
         border-collapse: collapse;
795 795
         table-layout: fixed;
796
+        width: 100% !important;
796 797
     }
797 798
 
798 799
     .art-main th, td {
@@ -800,11 +801,61 @@
800 801
         padding: 10px 0;
801 802
         /*white-space: normal;
802 803
         word-wrap: break-word;*/
803
-        overflow: hidden;
804
+        /*overflow: hidden;*/
804 805
     }
805 806
     .art-main nobr{
806 807
         /*white-space: normal;
807 808
         word-wrap: break-word;*/
808
-        overflow: hidden;
809
+        /*overflow: hidden;*/
810
+    }
811
+    .td1{
812
+        width:70% !important;
813
+        white-space: pre-wrap;
814
+        word-break: break-all; word-wrap:break-word;
815
+    }
816
+    .td1 nobr{
817
+        word-break: break-all; word-wrap:break-word;
818
+        white-space: pre-wrap;
819
+    }
820
+
821
+    .td2{
822
+        width:30% !important;
823
+    }
824
+
825
+    #cl_detail .part .items{
826
+        padding: 0px 5px 5px 5px !important;
809 827
     }
810 828
 }
829
+
830
+#cl_detail .art-main{
831
+    position: relative;
832
+}
833
+#cl_detail .art-main-sp{
834
+    height: 450px;
835
+    overflow: hidden;
836
+}
837
+.btn-show{
838
+    bottom: 0;
839
+    height:30px;
840
+    text-align: center;
841
+    background: #fff;
842
+    width: 100%;
843
+    line-height: 30px;
844
+    cursor: pointer;
845
+    /*background-color: rgba(255, 255, 255, 0.9);*/ /* 半透明白色 */
846
+}
847
+
848
+.btn-bg{
849
+    height:80px;
850
+    line-height: 130px;
851
+    position: absolute;
852
+    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,1)), url('your-image.jpg');
853
+    background-size: cover;
854
+}
855
+
856
+.btn-show span{
857
+    color: red;
858
+/*    background: #fff;
859
+    padding: 5px 15px;
860
+    border-radius: 15px;*/
861
+}

+ 21
- 1
template/pc/js/default.js View File

@@ -17,4 +17,24 @@ jQuery('a').click(function(){
17 17
 */
18 18
 
19 19
 //创建菜单栏
20
-//document.write("<scr"+"ipt src=\"/nav.js\" charset=\"utf-8\" language=\"JavaScript\"></sc"+"ript>")
20
+//document.write("<scr"+"ipt src=\"/nav.js\" charset=\"utf-8\" language=\"JavaScript\"></sc"+"ript>")
21
+
22
+
23
+$('#cl_detail .art-main table tr td:nth-child(1)').addClass('td1');
24
+$('#cl_detail .art-main table tr td:nth-child(2)').addClass('td2');
25
+
26
+$(document).on('click','.btn-show',function (){
27
+    var tx = $(this).children('span').text();
28
+    if(tx == '点击收起全文'){
29
+        console.log('eee');
30
+        $('#cl_detail .art-main').addClass('art-main-sp');
31
+        $(this).children('span').text('点击查看全文');
32
+        $(this).addClass('btn-bg');
33
+    }else{
34
+        console.log('eee');
35
+        $('#cl_detail .art-main').removeClass('art-main-sp');
36
+        $(this).children('span').text('点击收起全文');
37
+        $(this).removeClass('btn-bg');
38
+    }
39
+
40
+});

Loading…
Cancel
Save