element/examples/docs/zh-CN/color.md

132 lines
3.5 KiB
Markdown
Raw Normal View History

2016-09-01 04:34:33 +00:00
<style>
.demo-color-box {
border-radius: 4px;
padding: 20px;
margin: 5px 0;
2016-09-01 04:34:33 +00:00
height: 74px;
box-sizing: border-box;
color: #fff;
font-size: 14px;
& .value {
font-size: 12px;
opacity: 0.69;
2016-09-18 14:01:26 +00:00
line-height: 24px;
2016-09-01 04:34:33 +00:00
}
}
.demo-color-box-group {
.demo-color-box {
border-radius: 0;
margin: 0;
2016-09-01 04:34:33 +00:00
}
.demo-color-box:first-child {
border-radius: 4px 4px 0 0;
}
.demo-color-box:last-child {
border-radius: 0 0 4px 4px;
}
}
.bg-blue {
background-color: #409EFF;
2016-09-01 04:34:33 +00:00
}
.bg-success {
background-color: #67C23A;
2016-09-01 04:34:33 +00:00
}
.bg-warning {
2017-12-12 04:45:09 +00:00
background-color: #E6A23C;
2016-09-01 04:34:33 +00:00
}
.bg-danger {
2017-12-12 04:45:09 +00:00
background-color: #F56C6C;
2016-09-01 04:34:33 +00:00
}
.bg-info {
2017-12-12 04:45:09 +00:00
background-color: #909399;
2016-09-01 04:34:33 +00:00
}
.bg-text-primary {
2017-12-12 04:45:09 +00:00
background-color: #303133;
}
.bg-text-regular {
2017-12-12 04:45:09 +00:00
background-color: #606266;
2016-09-01 04:34:33 +00:00
}
.bg-text-secondary {
2017-12-12 04:45:09 +00:00
background-color: #909399;
2016-09-01 04:34:33 +00:00
}
.bg-text-placeholder {
2017-12-12 04:45:09 +00:00
background-color: #c0c4cc;
2016-09-01 04:34:33 +00:00
}
.bg-border-base {
2017-12-12 04:45:09 +00:00
background-color: #dcdfe6;
2016-09-01 04:34:33 +00:00
}
.bg-border-light {
2017-12-12 04:45:09 +00:00
background-color: #e4e7ed;
2016-09-01 04:34:33 +00:00
}
.bg-border-lighter {
2017-12-12 04:45:09 +00:00
background-color: #ebeef5;
2016-09-01 04:34:33 +00:00
}
.bg-border-extra-light {
2017-12-12 04:45:09 +00:00
background-color: #f2f6fc;
2016-09-01 04:34:33 +00:00
}
[class*=" bg-border-"] {
2017-12-12 04:45:09 +00:00
color: #303133;
2016-09-01 04:34:33 +00:00
}
</style>
## Color 色彩
Element 为了避免视觉传达差异,使用一套特定的调色板来规定颜色,为你所搭建的产品提供一致的外观视觉感受。
### 主色
Element 主要品牌颜色是鲜艳、友好的蓝色。
<el-row :gutter="12">
<el-col :span="6" :xs="{span: 12}">
<div class="demo-color-box bg-blue">Blue<div class="value">#409EFF</div></div>
2016-09-01 04:34:33 +00:00
</el-col>
</el-row>
### 辅助色
2016-09-14 10:38:38 +00:00
除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
2016-09-01 04:34:33 +00:00
<el-row :gutter="12">
<el-col :span="6" :xs="{span: 12}">
<div class="demo-color-box bg-success">Success<div class="value">#67C23A</div></div>
2016-09-01 04:34:33 +00:00
</el-col>
<el-col :span="6" :xs="{span: 12}">
2017-12-12 04:45:09 +00:00
<div class="demo-color-box bg-warning">Warning<div class="value">#E6A23C</div></div>
2016-09-01 04:34:33 +00:00
</el-col>
<el-col :span="6" :xs="{span: 12}">
2017-12-12 04:45:09 +00:00
<div class="demo-color-box bg-danger">Danger<div class="value">#F56C6C</div></div>
2016-09-01 04:34:33 +00:00
</el-col>
<el-col :span="6" :xs="{span: 12}">
2017-12-12 04:45:09 +00:00
<div class="demo-color-box bg-info">Info<div class="value">#909399</div></div>
2016-09-01 04:34:33 +00:00
</el-col>
</el-row>
### 中性色
中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
<el-row :gutter="12">
<el-col :span="6" :xs="{span: 12}">
2016-09-01 04:34:33 +00:00
<div class="demo-color-box-group">
2017-12-12 04:45:09 +00:00
<div class="demo-color-box bg-text-primary">主要文字<div class="value">#303133</div></div>
<div class="demo-color-box bg-text-regular">常规文字<div class="value">#606266</div></div>
<div class="demo-color-box bg-text-secondary">次要文字<div class="value">#909399</div></div>
<div class="demo-color-box bg-text-placeholder">占位文字<div class="value">#C0C4CC</div></div>
2016-09-01 04:34:33 +00:00
</div>
</el-col>
<el-col :span="6" :xs="{span: 12}">
2016-09-01 04:34:33 +00:00
<div class="demo-color-box-group">
2017-12-12 04:45:09 +00:00
<div class="demo-color-box bg-border-base">一级边框<div class="value">#DCDFE6</div></div>
<div class="demo-color-box bg-border-light">二级边框<div class="value">#E4E7ED</div></div>
<div class="demo-color-box bg-border-lighter">三级边框<div class="value">#EBEEF5</div></div>
<div class="demo-color-box bg-border-extra-light">四级边框<div class="value">#F2F6FC</div></div>
2016-09-01 04:34:33 +00:00
</div>
</el-col>
</el-row>