使用多种颜色的背景到web [英] using multiple colors of background to the web

查看:258
本文介绍了使用多种颜色的背景到web的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,如果标题有点误导。
我想做的是覆盖我的背景的索引页,真正的浅灰色除了显示我的内容的部分。

Sorry if the title is little bit misleading. What I'm trying to do is to cover my background of index page with really light grey except for the section that displays my contents.

<div class="col-sm-1">
</div>
<div class="col-sm-8">
</div>
<div class="col-sm-3">
</div>

我想col-sm-8是唯一的白色,其余的都是灰色的。
我可以使用css使col-sm-8灰色,但是我该怎么办?

I want col-sm-8 to be the only white, and rest to be all grey. I can make col-sm-8 grey using css, but how do I do the opposite?

推荐答案

[class*="col-"] {
    background : grey;
}

.col-sm-8{
  background: white;
}

] selector do是它将给类属性的值以灰色背景开头col -

well, what [class*="col-"] selector do is that it will give grey background to the values of class attributes begin with col-

其完整的类名。

这篇关于使用多种颜色的背景到web的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆