彩色图片转黑白素描效果代码
代码语言:html
所属分类:其他
代码描述:彩色图片转黑白素描效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Hind:wght@400;700&&display=swap">
<style>
* {
border: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
font-size: calc(16px + (24 - 16) * (100vw - 320px) / (2560 - 320));
--bg: #737a8c;
--buttonBg: #2762f3;
--buttonHoverBg: #0c48db;
--formBg: #fff;
--inputBorder: #abafba;
--inputBg: #fff;
--inputDisableBg: #e3e4e8;
--pColor: #17181c;
}
body, button, input {
color: var(--pColor);
font: 1em/1.5 "Hind", system-ui, -apple-system, sans-serif;
}
body, .upload-btn {
overflow: hidden;
}
body {
background: var(--bg);
display: flex;
flex-direction: column-reverse;
height: 100vh;
}
aside, button, canvas, input, main, .upload-btn input[type=file] {
width: 100%;
}
aside {
background: var(--formBg);
box-shadow: 0 0 0.25em hsla(223,10%,10%,0.5);
overflow: auto;
}
button, input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
button, input[type=color], input[type=file], input[type=file]::-webkit-file-upload-button {
cursor: pointer;
}
button:hover, button:focus, .btn-link:hover, .btn-link:focus, input[type=file]:hover + button, input[type=file]:focus + button {
background: var(--buttonHoverBg);
}
button, .btn-link, canvas, input, label {
display: block;
}
button, .btn-link {
background: var(--buttonBg);
border-radius: 0.375em;
color: #fff;
margin-bottom: 1.5em;
padding: 0.75em 1em;
transition: background 0.1s linear;
}
button:focus, .btn-link:focus {
outline: 0;
}
canvas {
image-rendering: pixelated; /* as of Feb 2021, not supported in Firefox */
max-height: calc(100vh - 16.625em);
object-fit: contain;
}
form {
pad.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0