运行 ❯
获取你
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #grad1 { height: 150px; width: 150px; background-image: radial-gradient(closest-side at 60% 55%,blue,green,yellow,black); } #grad2 { height: 150px; width: 150px; background-image: radial-gradient(farthest-side at 60% 55%,blue,green,yellow,black); } #grad3 { height: 150px; width: 150px; background-image: radial-gradient(closest-corner at 60% 55%,blue,green,yellow,black); } #grad4 { height: 150px; width: 150px; background-image: radial-gradient(farthest-corner at 60% 55%,blue,green,yellow,black); } </style> </head> <body> <h3>Radial Gradients - Use of different size keywords</h3> <p><strong>closest-side:</strong></p> <div id="grad1"></div> <p><strong>farthest-side:</strong></p> <div id="grad2"></div> <p><strong>closest-corner:</strong></p> <div id="grad3"></div> <p><strong>farthest-corner (this is default):</strong></p> <div id="grad4"></div> </body> </html>