Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

คุณสมบัติ CSS พื้นหลังผสมโหมด


ใช้ โหมดผสมพื้นหลัง คุณสมบัติเพื่อตั้งค่าโหมดการผสมของแต่ละเลเยอร์พื้นหลังด้วย CSS คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อใช้คุณสมบัติ background-blend-mode และตั้งค่าโหมดเป็น darken

ตัวอย่าง

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