css渐变给滚动条

标签 css linear-gradients

嘿,我使用一个 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))
    );
}

示例 http://driglou.pusku.com/javascript/

最佳答案

body 样式更改为 margin: 0 就可以了。

你最好寻找一个 CSS Reset 代码并使用它。

关于css渐变给滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16379368/

相关文章:

css - 我可以在背景中定位和调整线性渐变的大小吗?

javascript - 将 jquery live 更改为分页

html - flex 容器的绝对定位子容器不参与 flex 布局,如何使元素居中?

html - 水平居中三个 anchor 标记之一

css - 显示具有 css 渐变效果的图像

html - 在带有底部边框的 "row"顶部创建元素的底部边框

css - 如何在 li 中禁用 css 中的单击和选择

javascript - React JSX 元素不继承 'id' 样式属性

css - 带边框半径的边框渐变

css - 带停止的线性渐变在 IE11 中不起作用