渐变

2018-06-06 10:11 更新

/ 渐变注意兼容模式的方向以及不要加to/ <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <div style="margin: 10px auto; width: 80px;height: 40px; background: linear-gradient(to left ,red,blue);" class="change"> s </div> <hr /> <div style="margin: 10px auto; width: 80px;height: 40px; background: linear-gradient(to left top ,red,blue);" class="change"> s </div><hr /> <div style="margin: 10px auto; width: 80px;height: 40px; background: -webkit-linear-gradient(right ,red,blue);" class="change"> s </div><hr /> <div style="margin: 10px auto; width: 80px;height: 40px; background: -webkit-linear-gradient(right bottom ,red,blue);" class="change"> s </div> <hr /> <div style="margin: 10px auto; width: 80px;height: 40px; background: -webkit-linear-gradient(60deg ,red,blue);" class="change"> s </div><hr /> <div style="margin: 10px auto; width: 80px;height: 40px; background: linear-gradient(30deg ,red,blue);" class="change"> s </div> </body> </html>

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号