CSS3 从左到右渐变
你可以尝试运行以下代码来在 CSS3 中实现从左到右的渐变
示例
<html> <head> <style> #grad1 { height: 100px; background: -webkit-linear-gradient(left, red , blue); background: -o-linear-gradient(right, red, blue); background: -moz-linear-gradient(right, red, blue); background: linear-gradient(to right, red , blue); } </style> </head> <body> <div id = "grad1"></div> </body> </html>
广告