Giter Site home page Giter Site logo

cmui's Introduction

CMUI

CMUI is a UI framework for mobile web. It provides rich widgets and simple interfaces out-of-the-box, which helps developers get ride of details of styling and troubles of compatibility, and focus on building their own applications.

CMUI 是一个专攻移动网页的 UI 框架,它提供了丰富的组件和简洁的接口,开箱即用。CMUI 帮助开发者摆脱样式细节和兼容性困扰,从而腾出更多精力投入到业务开发中。

兼容性

浏览器支持

  • 支持以下移动平台的主流浏览器:

    • iOS 7+
    • Android 4+
  • 同样支持以下桌面浏览器:

    • Firefox (Latest)
    • Chrome (Latest)
    • Safari (Latest)

(更多细节参见 CMUI 的浏览器分级支持策略。)

外部依赖

  • Underscore 1.6+
  • Zepto 1.1+
  • Gearbox 0.6+

安装与使用

CMUI v2 仍在 beta 阶段,以下步骤可能无法工作。

传统方式

  1. 通过 npm 3 安装:

    $ npm install cmui
  2. 在页面中加载 CMUI 的样式文件、脚本文件及必要的依赖:

    <!DOCTYPE html>
    <html>
    <head>
    	...
    	<link rel="stylesheet" href="node_modules/cmui/dist/cmui.css">
    </head>
    <body>
    	...
    	<script src="node_modules/underscore/underscore-min.js"></script>
    	<script src="node_modules/zepto.js/dist/zepto.min.js"></script>
    	<script src="node_modules/cmui-gearbox/dist/gearbox.min.js"></script>
    	<script src="node_modules/cmui/dist/cmui.js"></script>
    </body>
    </html>

通过 Stylus 加载

如果你的项目以 Stylus 作为 CSS 预处理器语言,则可以在你的源码中直接引入 CMUI 的样式入口文件:

@import './node_modules/cmui/src/css/theme/baixing/index'

在这种方式下,你可以在源码中使用 CMUI 提供的高级 API

  • 变量
  • Mixin

演示与文档

建议使用 iOS/Android 设备访问:CMUI Demo

cmui-demo

谁在用?

以下案例基于 CMUI v2 构建(请使用 iOS/Android 设备访问):

以下案例基于 CMUI v0.8 构建(建议使用 iOS/Android 设备访问):


Thanks

CMUI is based on these open source projects:

License

MIT License

cmui's People

Contributors

cssmagic avatar zpbx avatar myst729 avatar xuemengfei avatar lyt9304 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.