运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #grad1 { height: 100px; background-image: linear-gradient(0deg, red, blue); } #grad2 { height: 100px; background-image: linear-gradient(90deg, red, blue); } #grad3 { height: 100px; background-image: linear-gradient(180deg, red, blue); } #grad4 { height: 100px; background-image: linear-gradient(-90deg, red, blue); } </style> </head> <body> <h3>Linear Gradients - Using Different Angles</h3> <div id="grad1" style="color:white;text-align:center;">0deg</div><br> <div id="grad2" style="color:white;text-align:center;">90deg</div><br> <div id="grad3" style="color:white;text-align:center;">180deg</div><br> <div id="grad4" style="color:white;text-align:center;">-90deg</div> </body> </html>