CoffeeScript CSS ccss

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-16 21:58:35

软件介绍

CoffeeScript CSS 这个名字跟 CoffeeScript 无关,将脚本化的样式变成 CSS 代码。

install: npm install ccss

main.coffee:

ccss = require 'ccss'

template = require './template.coffee'
css = ccss.compile template
require('fs').writeFileSync 'main.css', css

#or all at once: ccss.compileFile './template.coffee', 'main.css'

template.coffee:

borderRadius = (str) ->
  WebkitBorderRadius: str
  MozBorderRadius:    str
  borderRadius:       str

boxShadow = (str) ->
  WebkitBoxShadow: str
  MozBoxShadow:    str
  boxShadow:       str

module.exports =
  form:
    input:
      padding: '5px'
      border: '1px solid'
      mixins: borderRadius '5px'
  '#id .className': do ->
    opaque = 1
    translucent = opaque / 2
    img:
      mixins: [
        borderRadius '5px'
        boxShadow '5px'
      ]
      opacity: translucent
    'img:hover':
      opacity: opaque

main.css:

form input {
  padding: 5px;
  border: 1px solid;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}
#id .className img {
  opacity: 0.5;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  -webkit-box-shadow: 5px;
  -moz-box-shadow: 5px;
  box-shadow: 5px;
}
#id .className img:hover {
  opacity: 1;
}

本文地址:https://codercto.com/soft/d/3740.html

运营制胜

运营制胜

张恒 / 电子工业出版社 / 2016-10-1 / 65

《运营制胜——从零系统学运营构建用户增长引擎》主要从内容运营、用户运营、推广运营三个方向来介绍产品运营方面的知识。 其中内容运营主要介绍了内容生成的机制、内容方向设定、内容输出、内容生产引擎、内容推荐机制、数据如何驱动内容运营、内容运营的KPI 设定、建立内容库、内容的赢利模式。用户运营主要介绍了产品的冷启动、获得种子用户及早期用户、建立用户增长引擎、利用心理学引爆产品用户增长、增加用户活跃......一起来看看 《运营制胜》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器