CSS模块化

简介: 1. Base2. Layout3. Module4. State5. Theme   1) Base rules Base rules are the defaults. eg: html, body, form { margin: 0; padding: 0; } input[t...

1. Base
2. Layout
3. Module
4. State
5. Theme

 

1) Base rules

Base rules are the defaults.

eg:

html, body, form { margin: 0; padding: 0; }
input[type=text] { border: 1px solid #999; }
a { color: #039; }
a:hover { color: #03C; }

 

2) Layout rules

divide the page into sections. Layouts hold one or
more modules together. 

 

3) Modules

are the reusable, modular parts of our design. They are
the callouts, the sidebar sections, the product lists and so on.

 

4) State rules

are ways to describe how our modules or layouts will
look when in a particular state. Is it hidden or expanded? Is it active
or inactive? They are about describing how a module or layout
looks on screens that are smaller or bigger. They are also about describing
how a module might look in different views like the home
page or the inside page.

 

5) Theme rules

are similar to state rules in that they describe
how modules or layouts might look. Most sites don’t require a layer
of theming but it is good to be aware of it.

 

目录
相关文章
|
6月前
|
前端开发
React-组件-CSS模块化
React-组件-CSS模块化
39 0
|
8月前
|
移动开发 前端开发 JavaScript
css模块化的方案
css模块化的方案
93 0
|
12月前
|
前端开发 JavaScript 安全
|
12月前
|
存储 缓存 小程序
【微信小程序】CSS模块化、使用缓存在本地模拟服务器数据库
哈喽大家好,本期是微信小程序专栏第十五期。本期主要内容是使用缓存在本地模拟服务器数据库。主要包括了解应用程序的生命周期、Storage缓存初始化、设置缓存和清理缓存等。
122 0
|
前端开发
前端学习案例8-webpack中css模块化
前端学习案例8-webpack中css模块化
44 0
前端学习案例8-webpack中css模块化
|
前端开发
使用 BEM 来模块化你的 CSS 代码
本文讲的是使用 BEM 来模块化你的 CSS 代码,如果你对 BEM 不熟悉,它是通过一种严格方式来将 CSS 类划分成独立构成要素的一种命名方法。它表示为 Block Element Modifier,一个常见的 BEM 看起来就像这样:
1286 0
|
前端开发 JavaScript 关系型数据库
|
前端开发 数据可视化 开发者
前端开发——模块化(css模块化开发)
掌握模块化开发的思想是我们进行模块化开发的基础。他有以下几部分组成: 1.css模块化 2.html模块化 3.js模块化 模块化开发的优势 1.更好的组织和维护代码 2.按需加载 3.避免命名冲突 css模块化 css模块化编程语言 说到css的编程语言我们就需要了解一下css预处理器,它用一种专门的编程语言,为 CSS 增加了一些编程的特性,将 CSS 作为目标生成文件,然后开发者就只要使用这种语言进行编码工作。
1186 0
|
9天前
|
前端开发 JavaScript 开发工具
【HTML/CSS】入门导学篇
【HTML/CSS】入门导学篇
19 0
|
4天前
|
前端开发 搜索推荐 数据安全/隐私保护
HTML标签详解 HTML5+CSS3+移动web 前端开发入门笔记(四)
HTML标签详解 HTML5+CSS3+移动web 前端开发入门笔记(四)
14 1