svg+vue绘制卡车效果
代码语言:html
所属分类:布局界面
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> Tesla truck</title> <style> html, body { background-color: #222; height: 100%; margin: 0; } #app { height: 100%; } .container { height: 100%; display: flex; align-items: center; justify-content: center; } .container svg { background: linear-gradient(to right, #c2c7cd, #fefefc); height: 90%; filter: blur(0.5px); } </style> </head> <body translate="no"> <div id="app"> <div class="container"> <svg viewBox="0 0 875 492"> <defs> <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" stop-color="#aaaeb3"></stop> <stop offset="10%" stop-color="#aaaeb3"></stop> <stop offset="50%" stop-color="#94959a"></stop> <stop offset="80%" stop-color="#70747f"></stop> <stop offset="100%" stop-color="#6b727a"></stop> </linearGradient> <linearGradient id="chasis-top-grad" x1="85%" y1="10%" x2="0%" y2="100%"> <stop offset="0%" stop-color="#7c8fa7"></stop> <stop offset="100%" stop-color="#a9b9c9"></stop> </linearGradient> <linearGradient id="tire-grad" x1="100%" y1="0%" .........完整代码请登录后点击上方下载按钮下载查看
网友评论0