0

こんにちは、css グラデーション ジェネレーターの 1 つを使用して css グラデーションを作成し、いつものように通常の方法でコードを挿入しました。下隅にいくつかの四角が表示されます。これは私のスタイル コードで、マークアップは 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/

4

2 に答える 2

2

bodyスタイルを変えれmargin: 0ばOK。

CSS Resetコードを探して使用することをお勧めします。

于 2013-05-04T22:00:41.520 に答える
0

本文からマージンを削除してみてください。

body { margin: 0; }
于 2013-05-04T22:02:37.050 に答える