dyjh 6 lat temu
rodzic
commit
a690cdb4f9
1 zmienionych plików z 32 dodań i 2 usunięć
  1. 32 2
      resources/views/admin/album/cat/index.blade.php

+ 32 - 2
resources/views/admin/album/cat/index.blade.php

xqd xqd xqd
@@ -1,6 +1,34 @@
 @extends('admin.layout') 
 
 @section('content')
+<style>
+	.slider {
+		overflow-y: hidden;
+		max-height: 500px; /* 最大高度 */
+		background: pink;
+		height: 200px;
+		width: 200px;
+		/*  Webkit内核浏览器:Safari and Chrome*/
+		-webkit-transition-property: all;
+		-webkit-transition-duration: .5s;
+		-webkit-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
+		/*  Mozilla内核浏览器:firefox3.5+*/
+		-moz-transition-property: all;
+		-moz-transition-duration: .5s;
+		-moz-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
+		/*  Opera*/
+		-o-transition-property: all;
+		-o-transition-duration: .5s;
+		-o-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
+		/*  IE9*/
+		-ms-transition-property: all;
+		-ms-transition-duration: .5s;
+		-ms-transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
+	}
+	.slider .closed {
+		max-height: 0;
+	}
+</style>
 <div class="wrapper wrapper-content animated fadeInRight">
 	<div class="row">
 		<div class="col-sm-12">
@@ -74,7 +102,7 @@
 							</tr>
 							@if(isset($item->sonlist))
 								@foreach($item->sonlist as $k => $t)
-									<tr style="background-color: #f9f9f9;display: none" id="son{{ $item->id }}">
+									<tr style="background-color: #f9f9f9;" id="son{{ $item->id }}" class="slider closed">
 										<td>{{ $t->id }}</td>
 										<td>{{ $t->name }}</td>
 										<td>{{ $t->level }}</td>
@@ -122,10 +150,12 @@
 		var text = $("#a"+id).text();
 		if (text == '查看') {
             $("#a"+id).text('隐藏');
+            $("#son"+id).removeClass('closed')
 		} else {
             $("#a"+id).text('查看');
+            $("#son"+id).addClass('closed')
 		}
-		$("#son"+id).slideToggle(2000);
+		//$("#son"+id).slideToggle(2000);
 	}
 </script>
 @endsection