CSS background-blend-mode 属性

cssweb developmentfront end technology更新于 2024/9/7 23:08:17

使用 background-blend-mode 属性通过 CSS 设置每个背景层的混合模式。您可以尝试运行以下代码来实现 background-blend-mode 属性,并将模式设置为变暗

示例

<!DOCTYPE html>
<html>
   <head>
      <style>
         #myDIV {
            width: 250px;
            height: 170px;
            background-repeat: no-repeat, repeat;
            background-image: url("https://www.cainiaomax.com/assets/videotutorials/courses/3d_animation_online_training/380_course_211_image.jpg"),
               url( https://www.cainiaomax.com/latest/dc.js.png);
            background-blend-mode: darken;
         }
      </style>
   </head>
   <body>
      <h1>Set Blend Mode</h1>
      <div id = "myDIV"></div>
   </body>
</html>

相关文章


有用资源