Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 选择器前的CSS填充可用空间_Html_Css_Twitter Bootstrap_Css Selectors - Fatal编程技术网

Html 选择器前的CSS填充可用空间

Html 选择器前的CSS填充可用空间,html,css,twitter-bootstrap,css-selectors,Html,Css,Twitter Bootstrap,Css Selectors,有没有一种方法可以让选择器填充空间的右侧,而左侧保持不变 我希望红线填满可用空间的右侧,是否可行 .grey { border-left:1px solid #d1d1d1; background: #e0e0e0; } .grey:before { content:''; width:100%; height:100%; background:red; position:absolute

有没有一种方法可以让选择器填充空间的右侧,而左侧保持不变

我希望红线填满可用空间的右侧,是否可行

.grey {
    border-left:1px solid #d1d1d1;
    background: #e0e0e0;
}

    .grey:before {
        content:'';
        width:100%;
        height:100%;
        background:red;
        position:absolute;
        z-index:-99;
    }
我正在使用引导RC2。
.grey
类被添加到
col-4
div中

我希望屏幕的左侧保持不变,但右侧填充“红色”。 颜色应从
col-4
div开始。

尝试使用calc()

样本

.container:before{
    content: '';
    height: 100%;
    background: red;
    position: absolute;
    top:0;
    right: 0;
    width: calc(((100% - 1170px)/2));
}
尝试使用calc()

样本

.container:before{
    content: '';
    height: 100%;
    background: red;
    position: absolute;
    top:0;
    right: 0;
    width: calc(((100% - 1170px)/2));
}

你能展示一下你目前拥有的吗?@thirtydot space after Recent Activity或space include Recent Activity?@AdityaSaxena after and or include两者都可以。但不是在最近的活动之前。你能展示一下你目前拥有的吗?@thirtydot space在最近的活动之后还是包括最近的活动的空间?@AdityaSaxena after and or include两者都可以。但不是在最近的活动之前。哇。我甚至不知道CSS中有一个calc()属性,或者它是一个hack?这是CSS 3中的一个新函数-请查看以了解更多信息。还可以看看浏览器支持。哇。我甚至不知道CSS中有一个calc()属性,或者它是一个hack?这是CSS 3中的一个新函数-请查看以了解更多信息。另外,请看一下浏览器支持。