range美化彩虹滑动取值器滑块效果代码
代码语言:html
所属分类:表单美化
代码描述:range美化彩虹滑动取值器滑块效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html { font-size: 4.5vw; } @media screen and (min-width: 600px) { html { font-size: 3.5vw; } } @media screen and (min-width: 800px) { html { font-size: 2.5vw; } } @media screen and (min-width: 1200px) { html { font-size: 30px; } } body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #161616; padding: 0; margin: 0; } .range-wrapper { position: relative; z-index: 0; top: -0.6rem; height: 0.25rem; } .range-wrapper::before { content: ""; position: absolute; top: -0.5rem; right: 0; width: calc(100% - var(--progress)); height: 2rem; background: rgba(22, 22, 22, 0.7); border-radius: 999px; } .range-wrapper::after { content: ""; position: absolute; top: 0.6rem; left: 0; z-index: -1; width: var(--progress); height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff0000 0, #ff7700 calc(20rem / 6), #ffff00 calc(20rem * 2 / 6), #00ff00 calc(20rem * 3 / 6), #00ffff calc(20rem * 4 / 6), #0000ff calc(20rem * 5 / 6), #ff00ff 100%); filter: blur(12px); } @-moz-document url-prefix() { .range-wrapper::before { border-radius: 0; background: linear-gradient(90deg, transparent 1rem, rgba(22, 22, 22, 0.9)); pointer-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0