JSDM

HTML

11
 
1
div.wrap
2
  -for(var i=0;i<3;i++)
3
    -for(var j=0;j<3;j++)
4
      a.tab.circle
5
        i.fa.fa-times
6
        i.fa.fa-circle-o
7
      div.tab.circle
8
        i.fa.fa-times
9
        i.fa.fa-circle-o
10
      
11
       
!

CSS

x
 
1
body
2
  color #b6b5ca
3
  font-family 'Arial', sans-serif
4
  margin 0
5
  text-align center
6
.wrap
7
  width 500px
8
  margin 0 auto
9
  div
10
    background-color #b0dfe5
11
    display none
12
    &.circle
13
      i.fa-circle-o
14
       display inline!important
15
    &.cross:hover
16
      i.fa-times
17
        display inline!important
18
.tab
19
  width 150px
20
  height 150px
21
  background-color #d08aac
22
  display inline-block
23
  vertical-align middle
24
  margin 5px
25
  border-radius 14px
26
  cursor pointer
27
  font-size 70px
28
  line-height 150px
29
  color #eee
30
  text-shadow 2px 2px 4px rgba(0, 0, 0, 0.2)
31
  i
32
    display none!important
33
  &:hover
34
    background #aaa
35
  &.circle:hover
36
    i.fa-circle-o
37
      display inline!important
38
  &.cross:hover
39
    i.fa-times
40
      display inline!important
41
42
43
    
44
!
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

24
 
1
var state = (function () {
2
  var flag = true
3
  return {
4
    changeState: function () {
5
      flag = !flag
6
    },
7
    getState: function () {
8
      return flag
9
    }
10
  }
11
})(this)
12
13
$('.wrap').on('click', 'a', function  () {
14
  state.changeState()
15
  var $A = $('.wrap a')
16
    .toggleClass('circle', state.getState())
17
    .toggleClass('cross', !state.getState())
18
})
19
$('')
20
21
22
23
 /* $('a').mouseover(function(){$(this).css('background-color','#ddd')})
24
*/
!
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

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