实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style>
5
#grad1 {
6
    height: 200px;
7
    background: -webkit-linear-gradient(red, green, blue); /* Safari 5.1 - 6.0 */
8
    background: -o-linear-gradient(red, green, blue); /* Opera 11.1 - 12.0 */
9
    background: -moz-linear-gradient(red, green, blue); /* Firefox 3.6 - 15 */
10
    background: linear-gradient(red, green, blue); /* 标准的语法(必须放在最后) */
11
}
12
13
#grad2 {
14
    height: 200px;
15
    background: -webkit-linear-gradient(red, orange, yellow, green, blue, indigo, violet); /* Safari 5.1 - 6.0 */
16
    background: -o-linear-gradient(red, orange, yellow, green, blue, indigo, violet); /* Opera 11.1 - 12.0 */
17
    background: -moz-linear-gradient(red, orange, yellow, green, blue, indigo, violet); /* Firefox 3.6 - 15 */
18
    background: linear-gradient(red, orange, yellow, green, blue, indigo, violet); /* 标准的语法(必须放在最后) */
19
}
20
21
#grad3 {
22
    height: 200px;