0

上から #3a5976 と下から #2c4762

読みづらくてすみません、テキストエディタにコピーしてください

<html>
  <head>
    <style>
      body {
        background-image: linear-gradient(bottom, rgb(70,125,149) 19%, 
                          rgb(98,163,179) 60%, 
                          rgb(56,122,122) 80%);
        background-image: -o-linear-gradient(bottom, rgb(70,125,149) 19%, 
                          rgb(98,163,179) 60%, 
                          rgb(56,122,122) 80%);
        background-image: -moz-linear-gradient(bottom, rgb(70,125,149) 19%, 
                          rgb(98,163,179) 60%, 
                          rgb(56,122,122) 80%);
        background-image: -webkit-linear-gradient(bottom, rgb(70,125,149) 19%, 
                          rgb(98,163,179) 60%, 
                          rgb(56,122,122) 80%);
        background-image: -ms-linear-gradient(bottom, rgb(70,125,149) 19%, 
                          rgb(98,163,179) 60%, 
                          rgb(56,122,122) 80%);
           }
    </style>
  </head>
  <body>

  </body>

4

1 に答える 1

0

例の rgb() 値を 16 進値に置き換えます。

body{
background-color: #2c4762; /* fallback for browsers that don't support gradient */
background-image: linear-gradient(bottom, #2c4762, #3a5976 );
background-image: -o-linear-gradient(bottom, #2c4762, #3a5976 );
background-image: -moz-linear-gradient(bottom, #2c4762, #3a5976 );
background-image: -webkit-linear-gradient(bottom, #2c4762, #3a5976 );
background-image: -ms-linear-gradient(bottom, #2c4762, #3a5976 );
}

これは機能するフィドルです(本文の代わりに #content DIV を使用):http://jsfiddle.net/daNUM/

于 2013-09-27T17:49:12.807 に答える