点击查看html编辑器说明文档

pug + Sass demoedit icon

|
|
Fork(复制)
|
|
作者:
lynn-ssk
提交反馈
嵌入
设置
下载
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
            
            h2 Checkbox
label
  input(type='checkbox', name='check')
  span.label-text Normal
label
  input(type='checkbox', name='check' checked)
  span.label-text Checked
label
  input(type='checkbox', name='check' disabled)
  span.label-text Disabled
        
</body>
Sass
格式化
            
            @import "https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/4.6.3/css/font-awesome.min.css"

body
  padding: 50px
  font-family: 'Nunito', sans-serif
  font-weight: 400
  
label
  cursor: pointer
  color: #383A3F
  display: block
  margin-bottom: 10px
  font-size: 1.2em
 
  input[type="checkbox"] + .label-text:hover:before
    color: #fe4365
    
  input[type="checkbox"]
    display: none
  
    + .label-text:before
      content: "\f096"
      color: #dddfe6
      font-family: "fontAwesome"
      line-height: 1
      width: 1em
      display: inline-block
      margin-right: 5px
      
    &:checked + .label-text:before
      content: "\f14a"
      color: #fe4365
      animation: tick 150ms ease-in
      
    &:disabled + .label-text:before
      content: "\f0c8"
      color: #dddfe6
      
@keyframes tick
  0%
    transform: scale(0)
  90%
    transform: scale(1.3)
  100%
    transform: scale(1)
        
JS
格式化
            
            
        
预览
控制台