使用 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.tw/assets/videotutorials/courses/3d_animation_online_training/380_course_211_image.jpg"),url( https://tutorialspoint.tw/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