vue实现一个拾色器效果代码

代码语言:html

所属分类:选择器

代码描述:vue实现一个拾色器效果代码,支持滚轮换色及复制粘贴

代码标签: 拾色 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.css">
<style>
    @import url("https://fonts.googleapis.com/css?family=Space+Mono");
body, html {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

input {
  background-color: transparent;
}

input[type=range] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

input[type=range] {
  margin: 0;
  width: 20vmin;
}

input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 1.4vmin;
  cursor: pointer;
  animate: 0.2s;
  background: transparent;
  color: transparent;
  border-radius: 0;
  border: solid var(--colorInner);
  border-width: 0 0 1px;
}

input[type=range]::-webkit-slider-thumb {
  position: relative;
  z-index: 1;
  font-size: 1.9vmin;
  border-radius: 50%;
  border-bottom-left-radius: 0;
  width: 1em;
  height: 1em;
  background-color: var(--colorInner);
  box-shadow: 0 0 0 0.1em var(--colorUI);
  -webkit-transition: 200ms box-shadow linear;
  transition: 200ms box-shadow linear;
  cursor: pointer;
  -webkit-appearance: none;
  transform: translateY(-0.8em) rotate(-45deg);
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 1.4vmin;
  cursor: pointer;
  animate: 0.2s;
  background: transparent;
  color: transparent;
  border-radius: 0;
  border: solid var(--colorInner);
  border-width: 0 0 1px;
}

input[type=range]::-moz-range-thumb {
  position: relative;
  z-index: 1;
  font-size: 1.9vmin;
  border-radius: 50%;
  border-bottom-left-radius: 0;
  width: 1em;
  height: 1em;
  background-color: var(--colorInner);
  box-shadow: 0 0 0 0.1em var(--colorUI);
  -moz-transition: 200ms box-shadow linear;
  transition: 200ms box-shadow linear;
  cursor: pointer;
  -webkit-appearance: none;
  transform: translateY(-0.8em) rotate(-45deg);
}

input[type=range]::-ms-track {
  width: 100%;
  height: 1.4vmin;
  cursor: pointer;
  animate: 0.2s;
  background: transparent;
  color: transparent;
  border-radius: 0;
  border: solid var(--colorInner);
  border-width: 0 0 1px;
}

input[type=range]::-ms-fill-lower {
  background: var(--colorUI);
  -ms-transition: 200ms background-color linear;
  transition: 200ms background-color l.........完整代码请登录后点击上方下载按钮下载查看

网友评论0