嘿,我使用一个 css 渐变生成器制作了 css 渐变,我以通常的方式输入我的代码,因为它一直有效,现在...不知何故渐变使我的页面具有滚动条,而且如果你在我给定的情况下看起来更好链接你会在底 Angular 看到一些方 block 。 这是我的样式代码,标记非常干净,只有 html 和 body 标签,里面什么也没有……
html, body{
height: 100%;
background-position: fixed;
background: #ccffcc;
background-image: linear-gradient(bottom, rgb(161,219,255) 0%, rgb(204,255,204) 22%);
background-image: -o-linear-gradient(bottom, rgb(161,219,255) 0%, rgb(204,255,204) 22%);
background-image: -moz-linear-gradient(bottom, rgb(161,219,255) 0%, rgb(204,255,204) 22%);
background-image: -webkit-linear-gradient(bottom, rgb(161,219,255) 0%, rgb(204,255,204) 22%);
background-image: -ms-linear-gradient(bottom, rgb(161,219,255) 0%, rgb(204,255,204) 22%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(161,219,255)),
color-stop(0.22, rgb(204,255,204))
);
}
最佳答案
将 body
样式更改为 margin: 0
就可以了。
你最好寻找一个 CSS Reset
代码并使用它。
关于css渐变给滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16379368/