-1

我有这个网站:

http://77.104.141.197/~tommasom/otodi/

我需要在标题上实现这个结果(蓝色全宽)。

在此处输入图像描述

我尝试了这个解决方案:https ://css-tricks.com/full-browser-width-bars/但没有运气。

有什么建议吗?

4

2 回答 2

1

只需将此代码添加到您的 CSS 中:

.header-row {
    width: 100%;
    position: fixed;
    left: 0;
    top: 0;
    padding: 0 10% 0 10%;
    z-index:10;
}

html.boxed .body {
    margin-top: 90px;
}

于 2017-06-10T16:10:31.583 回答
0

尝试这个:

header {
  width: 100vw;
  background-color: blue;
  height: 100px;
}
<header></header>

于 2017-06-10T15:44:16.033 回答