# CSS 叠加效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body,
html {
height: 100%;
}
* {
margin: 0;
padding: 0;
}
image {
display: block;
width: 100%;
height: 100%;
}
input {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
mix-blend-mode: hue;
}
</style>
</head>
<body>
<input type="color" />
<img src="https://t7.baidu.com/it/u=3301366565,1952321188&fm=193&f=GIF" />
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body,
html {
height: 100%;
}
* {
margin: 0;
padding: 0;
}
image {
display: block;
width: 100%;
height: 100%;
}
input {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
mix-blend-mode: hue;
}
</style>
</head>
<body>
<input type="color" />
<img src="https://t7.baidu.com/it/u=3301366565,1952321188&fm=193&f=GIF" />
</body>
</html>