【发布时间】:2018-06-12 22:28:57
【问题描述】:
我正在尝试向同一个 css 类添加 2 种不同的背景颜色。
.stepwizard-row:before {
top: 14px;
bottom: 0;
position: absolute;
content: " ";
width: 100%;
height: 4px;
background-color: #d6d6c2;
z-order: 0;
}
是否可以为前 50%(考虑总宽度)设置一种背景颜色,为剩余部分设置另一种背景颜色? 如果无法实现,谁能给我一个实现这个目标的技巧?
【问题讨论】:
-
使用
background: linear-gradient(red, yellow);两种不同的颜色
标签: html css background background-color