使用 CSS 混合每个背景层的混合模式
使用 background-blend-mode 属性,通过 CSS 设置每个背景层的混合模式。你可以尝试运行以下代码,以实现背景混合模式属性,并将模式设置为变暗
示例
<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
width: 250px;
height: 170px;
background-repeat: no-repeat, repeat;
background-image:url("https://tutorialspoint.com/assets/videotutorials/courses/3d_animation_online_training/380_course_211_image.jpg"),url( https://tutorialspoint.com/latest/dc.js.png);
background-blend-mode: darken;
}
</style>
</head>
<body>
<h1>Set Blend Mode</h1>
<div id = "myDIV"></div>
</body>
</html>
广告
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP