入门13 css综合
2017-10-21 本文已影响18人
512a36a11b8c
1. 说一说你平时写代码遵守的编码规范
- 用小写
- 命名用引号包住
- 换行
-注意空格
2. 垂直居中有几种实现方式,给出代码范例
- padding居中
- 绝对定位实现居中
- vertical-align实现居中
- table-cell实现居中
将里面的东西视为表格去渲染,
居中
3. 常用命名
英文 | 中文 |
---|---|
.wrap或.wrapper | 用于外侧包裹 |
.container或 .ct | 包裹容器 |
.header | 用于头部 |
.body | 页面 body |
.footer | 页面尾部 |
aside、sidebar | 用于侧边栏 |
.content | 和header footer 对应,用于主要内容 |
.navigation | 导航元素 |
.pagination | 分页 |
.tabs > .tab | tab 切换 |
.breadcrumbs | 导航列表、面包屑 |
.dropdown | 下拉菜单 |
.article | 文章 |
.main | 用于主体 |
.thumbnail | 头像,小图像 |
.media | 媒体资源 |
.panel | 面板 |
.tooltip | 鼠标放置上去的提示 |
.popup | 鼠标点击弹出的提示 |
.button、.btn | 按钮 |
.ad | 广告 |
.subnav | 二级导航 |
.menu | 菜单 |
.tag | 标签 |
.message或者.notice | 提示消息 |
.summary | 摘要 |
.logo | logo |
.search | 搜索框 |
.login | 登录 |
.register | 注册 |
.username | 用户名 |
.password | 密码 |
.banner | 广告条 |
.copyright | 版权 |
.modal或者 .dialog | 弹窗 |
var 名字 = {
状态: [
'inverse',
'toggled',
'switched',
'original',
'initial',
'identified',
'disabled',
'loading',
'pending',
'syncing',
'default'
],
修饰: [
'dark',
'light',
'shaded',
'flat',
'ghost',
'maroon',
'pale',
'intense',
'twisted',
'narrow',
'wide',
'smooth',
'separate',
'clean',
'sharp',
'aligned'
],
元素: [
'pagination',
'modal',
'popup',
'article',
'story',
'flash',
'status',
'state',
'media',
'block',
'card',
'teaser',
'badge',
'label',
'sheet',
'poster',
'notice',
'record',
'entry',
'item',
'figure',
'square',
'module',
'bar',
'button',
'action',
'knob'
],
布局: [
'navigation',
'wrapper',
'inner',
'header',
'footer',
'aside',
'section',
'divider',
'content',
'container',
'panel',
'pane',
'construct',
'composition',
'spacing',
'frame'
]
}