js+css实现hwb选择器代码

代码语言:html

所属分类:选择器

代码描述:js+css实现hwb选择器代码,点击拖动滑竿试试。

代码标签: js css hwb 选择器 代码

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

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Rowdies:wght@700&amp;display=swap'>
  
<style>
:root {
	/* 	Vars to store the selected colors */
	--hueVal: 233;
	--whitenessVal: 27%;
	--blacknessVal: 29%;
	--alphaVal: 100%;
}

body {
	margin: 0;
	background: URL(//repo.bfw.wiki/bfwrepo/image/61de6e39623c8.png);
	background-repeat: no-repeat;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	background-attachment: fixed;
}

main {
	position: absolute;
	height: 100vh;
	width: 100vw;
	background-color: hwb(
		var(--hueVal) var(--whitenessVal) var(--blacknessVal) / var(--alphaVal)
	);
	z-index: 2;
}

#hwb {
	text-align: center;
	margin-top: 2vh;
}

p {
	font-family: "Rowdies", sans-serif;
	font-weight: 700;
	font-size: 2.5rem;
	text-transform: uppercase;
	line-height: 0.9;
	color: white;
	text-shadow: 0.1em 0.1em 0 bla.........完整代码请登录后点击上方下载按钮下载查看

网友评论0