2016-10-23 3 views
0

Ich versuche, einen Hintergrund mit Farbverlauf Hintergrund zu erstellen, aber wenn ich den Code in den Code-Editor legte nichts auf. Kann mir jemand helfen ?Css nicht in HTML

css.css:

background: linear-gradient(23deg, #243b66, #246634, #242a66, #576624, #664324,  #662465, #245566, #663e24); 
#background-size: 1600% 1600%; 

#-webkit-animation: AnimationName 59s ease infinite; 
#-moz-animation: AnimationName 59s ease infinite; 
#-o-animation: AnimationName 59s ease infinite; 
#animation: AnimationName 59s ease infinite; 

@-webkit-keyframes AnimationName { 
0%{background-position:0% 57%} 
50%{background-position:100% 44%} 
100%{background-position:0% 57%} 
} 
@-moz-keyframes AnimationName { 
0%{background-position:0% 57%} 
50%{background-position:100% 44%} 
100%{background-position:0% 57%} 
} 
@-o-keyframes AnimationName { 
0%{background-position:0% 57%} 
50%{background-position:100% 44%} 
100%{background-position:0% 57%} 
} 
@keyframes AnimationName { 
0%{background-position:0% 57%} 
50%{background-position:100% 44%} 
100%{background-position:0% 57%} 
} 

Html.HTML:

<html> 
<head> 
<link rel="stylesheet" type="text/css" href="css.css"> 
</head> 
<body> 

</body> 
</html> 
+0

Sie müssen die ersten sieben Zeilen in 'body {...}' einzuschließen. – Ahmad

+0

Hintergrund: Linear-Gradient "(" geöffnet, aber nicht geschlossen! Bitte schließen ")" – Bandi

+0

@ Irfan434 Das Bild zeigt, aber es bewegt sich nicht. – 6623ms

Antwort

0

Seine adaequat.

Ich hoffe, dass Sie verstehen können, was Sie in CSS-Datei fehlen.

body{ 
 
\t background: linear-gradient(23deg, #243b66, #246634, #242a66, #576624, #664324, #662465, #245566, #663e24); 
 
\t background-size: 1600% 1600%; 
 
\t -webkit-animation: AnimationName 59s ease infinite; 
 
\t -moz-animation: AnimationName 59s ease infinite; 
 
\t -o-animation: AnimationName 59s ease infinite; 
 
\t animation: AnimationName 59s ease infinite; 
 
} 
 

 
@-webkit-keyframes AnimationName { 
 
\t 0%{background-position:0% 57%} 
 
\t 50%{background-position:100% 44%} 
 
\t 100%{background-position:0% 57%} 
 
} 
 
@-moz-keyframes AnimationName { 
 
\t 0%{background-position:0% 57%} 
 
\t 50%{background-position:100% 44%} 
 
\t 100%{background-position:0% 57%} 
 
} 
 
@-o-keyframes AnimationName { 
 
\t 0%{background-position:0% 57%} 
 
\t 50%{background-position:100% 44%} 
 
\t 100%{background-position:0% 57%} 
 
} 
 
@keyframes AnimationName { 
 
\t 0%{background-position:0% 57%} 
 
\t 50%{background-position:100% 44%} 
 
\t 100%{background-position:0% 57%} 
 
}
<!DOCTYPE html> 
 
<html> 
 
<head> 
 
\t <title>Body Background</title> 
 
\t <link rel="stylesheet" type="text/css" href="css.css"> 
 
</head> 
 
<body> 
 

 
    <!-- This is body area --> 
 
    
 
</body> 
 
</html>