JSDM

HTML

 
1
<!-- control buttons -->
2
<div class="row">
3
  <div class="small-12 columns small-centered">
4
    <fieldset class="controls">
5
      <div class="row">
6
        <!-- filter buttons -->
7
        <div class="small-8 columns" id="controlsfilter">
8
          <label>Filter:</label>
9
          <button class="filter tiny round active" data-filter="all">All</button>
10
          <button class="filter tiny round" data-filter=".newyork">New York</button>
11
          <button class="filter tiny round" data-filter=".california">California</button>
12
          <button class="filter tiny round" data-filter=".texas">Texas</button>
13
        </div>
14
        <!-- layout buttons -->
15
        <div class="small-4 columns" id="controlslayout">
16
          <label>Layout:</label>
17
          <div class="controlslayout">
18
          <input type="radio" class="grid" checked="checked" name="layout" id="grid"><label id="labelgrid" for="grid"><i class="fa fa-th"></i></label></input><input type="radio" class="list" name="layout" id="list"><label id="labellist" for="list"><i class="fa fa-bars"></i></label></input></div>
19
        </div>
20
      </div>
21
    </fieldset>
22
  </div>
23
</div>
24
<div class="row">
25
  <!-- container for images -->
26
  <div class="small-12 columns small-centered">
27
    <div class="container" id="Container">
28
      <ul class="small-block-grid-3 medium-block-grid-4 large-block-grid-5">
29
        <li class="mix newyork"><img border="0" src="http://placehold.it/1000x800"/></li>
30
        <li class="mix newyork"><img border="0" src="http://placehold.it/1000x800"/></li>
31
        <li class="mix california"><img border="0" src="http://placehold.it/1000x800"/></li>
32
        <li class="mix newyork"><img border="0" src="http://placehold.it/1000x800"/></li>
33
        <li class="mix texas"><img border="0" src="http://placehold.it/1000x800"/></li>
34
        <li class="mix newyork"><img border="0" src="http://placehold.it/1000x800"/></li>
35
        <li class="mix newyork"><img border="0" src="http://placehold.it/1000x800"/></li>
36
        <li class="mix california"><img border="0" src="http://placehold.it/1000x800"/></li>
37
        <li class="mix california"><img border="0" src="http://placehold.it/1000x800"/></li>
38
        <li class="gap"/>
39
        <li class="gap"/>
40
      </ul>
41
    </div>
42
  </div>
43
</div>

CSS

x
 
1
/** Controls **/
2
.controls {
3
  padding:0.5em 0.25em 0.5em 1em;
4
  -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .2);
5
  -goog-ms-box-shadow: 0 0 20px rgba(0, 0, 0, .2);
6
  box-shadow: 0 0 20px rgba(0, 0, 0, .2);
7
  -moz-border-radius: 0;
8
}
9
10
.filter, .controlslayout label{
11
  background:#33cccc;
12
}
13
14
button, .button {
15
  margin-bottom:0.5em;
16
  outline:none;
17
}
18
19
.controls button.active, .controlslayout input[type="radio"]:checked + label{
20
  background: #007295;
21
}
22
23
#controlslayout input[type="radio"]{
24
  visibility:hidden;
25
  height: 0;
26
  width: 0;
27
}
28
29
#controlslayout input[type="radio"]+label {
30
  margin:0;
31
}
32
33
.controlslayout {
34
  display:block;
35
}
36
37
#controlslayout .fa {
38
  font-size:1.5em;
39
  color:#ffffff;
40
}
41
42
#labelgrid {
43
  border-radius: 1000px 0 0 1000px;
44
  padding-top: 0.5rem;
45
  padding-right: .75rem;
46
  padding-bottom: 0.3rem;
47
  padding-left: 1rem;
48
}
49
50
#labellist {
51
  border-radius: 0 1000px 1000px 0;
52
  padding-top: 0.5rem;
53
  padding-right: 1rem;
54
  padding-bottom: 0.3rem;
55
  padding-left: .75rem;
56
}
57
58
/** Container **/
59
#Container .mix {
60
  display:none;
61
}
62
63
#Container .large-block-grid-5>li:nth-of-type(5n+1), #Container .large-block-grid-5>li:nth-of-type(1n){
64
  clear:none;
65
}
? ?
? ?
必须是有效的URL
请输入有效的URL
+ 添加另一个资源

JS

xxxxxxxxxx
12
 
1
$(function(){
2
  $('#Container').mixItUp();
3
});
4
5
$('input').on('click',function() {
6
    if ($(this).hasClass('grid')) {
7
        $('#Container ul').removeClass('small-block-grid-1').addClass('small-block-grid-3 medium-block-grid-4 large-block-grid-5');
8
    }
9
    else if($(this).hasClass('list')) {
10
        $('#Container ul').removeClass('small-block-grid-3 medium-block-grid-4 large-block-grid-5').addClass('small-block-grid-1');
11
    }
12
});
必须是有效的URL
请输入有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

  1. 暂无文件
拖动文件到上面的区域或者:
加载中 ..................