我试图在多个方向上创建多个横向背景颜色,例如 here .
我尝试使用 background: -webkit-linear-gradient(top left, white,white 80%,#000099,#000099 20%);
但这会创建多个 css 背景一个方向的颜色。我真正需要的是 firebase 背景。
有什么提示吗?这是我的试用版:
html {
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 100%;
min-height: 100%;
}
body {
/*background-color: #f3f3f3;*/
background: -webkit-linear-gradient(top left, white,white 80%,#000099,#000099 20%);
}
<div style="border: 1px solid black; background-color: White; margin-top: 150px" class="container">
test test
</div>
最佳答案
我用了repeating选项。这是片段:
html
{
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height: 100%;
min-height: 100%;
}
body
{
background: -webkit-repeating-linear-gradient(45deg,
#9900CC,
#9900CC 40%,
#000099 40%,
#000099 80%);
}
<div style="border: 1px solid black; background-color: White; margin-top: 150px"
class="container">
test test
</div>
关于html - 正文背景颜色 : multiple sideways and directions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44667515/