webかたつむり ウェブデザインを勉強中 ウェブ初心者のおぼえがき
読者です 読者をやめる 読者になる 読者になる

webかたつむり

ウェブデザインを勉強中

blend mode / background-blend-mode

 

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>background-blend-mode test</title>
<style>
.container{
width: 80%;
height: 560px;
margin: 50px auto;
background-color: red;
background-image: url(../common/images/photo.jpg);
background-blend-mode: multiply;
}
</style>
</head>
<body>
<div class="container"></div>
</body>
</html>

 

f:id:ohta-felica:20161030091206p:plain

 <style>
.left{
width: 50%;
height: 560px;
float: left;
background-image: url(../common/images/photo.jpg);
background-color: rgba(255, 0, 0, 0.5);
background-blend-mode: screen;
color: white;
}
.right{
width: 50%;
height: 560px;
float: right;
background-image: url(../common/images/photo.jpg);
background-color: rgba(255, 0, 0, 0.5);
background-blend-mode: multiply;
color: white;
}
</style>

 

f:id:ohta-felica:20161030100928p:plain