获取具有不同背景颜色的两列,这些颜色延伸到屏幕边缘[重复](Get Two Columns with different background colours that extend to screen edge [duplicate])
这个问题在这里已有答案:
- Bootstrap全宽2个不同背景(和2列) 2个答案
- 在容器 4 外面扩展bootstrap行 答案
与此不重复。
我试图在网页上创建两列具有不同的背景颜色,延伸到屏幕边缘。 但是列的内容需要保持在引导盒装宽度内。
我发现这个答案几乎有效,但内部内容未在盒装宽度内正确对齐,特别是在1600px以上的大屏幕上。 它基本上看起来像:
下面是我可以使用的最接近的代码片段,它可能完全是错误的方法:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <div class="container" style="background: bisque;"> <div class="row"> <div class="col-xs-12"> <h1>Normal Boxed Width</h1> </div> </div> </div> <div class="container-fluid"> <div class="row" style="background-color: aquamarine; padding: 0"> <div> <div class="col-sm-8 col-sm-offset-1"> <h1>Left Panel</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae doloribus unde, distinctio a autem, soluta nulla similique. Vero natus deleniti, culpa consequuntur eveniet beatae laudantium in fuga mollitia sapiente! Assumenda!</p> </div> <div class="col-sm-3 gray-background" style="background-color: rebeccapurple;padding: 10px;color:#fff"> <h1>Right Panel</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ducimus, beatae amet est repellendus optio, exercitationem distinctio quasi ut, sapiente, nihil sed libero facere fugiat eaque numquam nulla mollitia suscipit nobis.</p> </div> </div> </div><!-- .row --> </div><!-- .container-fluid -->
This question already has an answer here:
Not a duplicate of this.
I trying to create two columns on a webpage have different background colours that extend to the screen edges. But the content of the columns needs to stay within the bootstrap boxed width.
I found this answer which almost worked but the inner content wasn't correctly aligned within the boxed width, especially on large screens over 1600px. It basically ended up looking like:
Below, is a code snippet of the closest I could get to it working, it may be the wrong approach entirely:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <div class="container" style="background: bisque;"> <div class="row"> <div class="col-xs-12"> <h1>Normal Boxed Width</h1> </div> </div> </div> <div class="container-fluid"> <div class="row" style="background-color: aquamarine; padding: 0"> <div> <div class="col-sm-8 col-sm-offset-1"> <h1>Left Panel</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae doloribus unde, distinctio a autem, soluta nulla similique. Vero natus deleniti, culpa consequuntur eveniet beatae laudantium in fuga mollitia sapiente! Assumenda!</p> </div> <div class="col-sm-3 gray-background" style="background-color: rebeccapurple;padding: 10px;color:#fff"> <h1>Right Panel</h1> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ducimus, beatae amet est repellendus optio, exercitationem distinctio quasi ut, sapiente, nihil sed libero facere fugiat eaque numquam nulla mollitia suscipit nobis.</p> </div> </div> </div><!-- .row --> </div><!-- .container-fluid -->
原文:https://stackoverflow.com/questions/41507852
最满意答案
该
COALESCE
用法是错误的。 改变它的样子COALESCE (tele_plan.plan_cost, 0) - COALESCE(SUM(tele_payment_items.amount), 0) as balance
That
COALESCE
usage is wrong. Change it likeCOALESCE (tele_plan.plan_cost, 0) - COALESCE(SUM(tele_payment_items.amount), 0) as balance
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
您可以使用Postgres array而不是列表,例如: SELECT coalesce(1 = any(null), true) a, coalesce(1 = any(array[1,2,3]), true) b, coalesce(1 = any('{1,2,3}'), true) c; a | b | c ---+---+--- t | t | t (1 row) You can use Postgres array instead of a list, e.g. ...
-
该COALESCE用法是错误的。 改变它的样子 COALESCE (tele_plan.plan_cost, 0) - COALESCE(SUM(tele_payment_items.amount), 0) as balance That COALESCE usage is wrong. Change it like COALESCE (tele_plan.plan_cost, 0) - COALESCE(SUM(tele_payment_items.amount), 0) as balance
-
你需要使用lookarounds。 (?<=\(\[)(?:[0-9]{1,3}\.){3}[0-9]{1,3}(?=\]\)) DEMO 要么 由于javascript不支持look-behinds,我们唯一的选择是捕获组并打印索引1以获取ip-addresses。 \(\[((?:[0-9]{1,3}\.){3}[0-9]{1,3})\]\) DEMO 在javascript中,它会是这样的 > var str = "foo ([122.122.122.122]) bar" undefined > ...
-
PostgreSQL 9.5 Coalesce(PostgreSQL 9.5 Coalesce)[2023-08-10]
看起来你的括号在错误的地方。 to_tsvector最多需要2个参数,但是你现在拥有它的方式是3个。 这应该解决它: UPDATE recipes SET recipes_searchtext = setweight(to_tsvector('german',COALESCE(name)), 'A') || setweight(to_tsvector('german',COALESCE(description)), 'B') || setweight(to_tsvector('german',COALES ... -
在我看来,你的问题就是你在字面上返回"['Name']"并插入一个onLoad值,该值本身用单引号括起来。 我无法准确地描述为什么你最终会得到你正在说的你得到的东西,但我猜你没有提供你确切的 javascript代码,并且onLoad包含在同一个引用中。 Name (此处显示字符串终止的单引号)。 所以你最终写出看起来像这样的html: onload变为“initPage([”(从你的错误中我看到onLoad设置在[所以它必须与onLoad字符串本身具有相同的引号]之后终止) ,当然,这是无效的javasc ...
-
听起来你没有将noImplicitAny 编译器选项设置为true 。 将该选项设置为false不会产生错误,但如果将其设置为true ,则会产生错误: [ts] Element implicitly has an 'any' type because type 'testObject' has no index signature. It sounds like you do not have the noImplicitAny compiler option set to true. With tha ...
-
匹配最后一个括号(Match the last bracket)[2024-01-29]
这个正则表达式将起作用 .*(\[.*\]) 正则表达式演示 更高效和非贪婪的版本 .*(\[[^\]]*\]) C#代码 string input = "atext[d][][ef]\nother[aa][][a]\nxxxxx[][xx][x][][xx]\nyyyyy[]"; string pattern = "(?m).*(\\[.*\\])"; Regex rgx = new Regex(pattern); Match match = rgx.Match(input); while (ma ... -
文件说: 索引表达式的能力已添加到SQLite版本3.9.0(2015-10-14)。 早期版本的SQLite将无法使用在表达式上使用索引的数据库。 显然,你的DbVisualizer非常过时。 The documentation says: The ability to index expressions was added to SQLite with version 3.9.0 (2015-10-14). A database that uses an index on expressions wil ...