<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.box {
background-color: red;
height: 5000px;
}
.box img {
width: calc(100% / 3);
height: auto;
float: left;
margin-bottom:10px;
}
.normal {mix-blend-mode: normal;}
.multiply {mix-blend-mode: multiply;}
.screen {mix-blend-mode: screen;}
.overlay {mix-blend-mode: overlay;}
.darken {mix-blend-mode: darken;}
.lighten {mix-blend-mode: lighten;}
.color-dodge {mix-blend-mode: color-dodge;}
.color-burn {mix-blend-mode: color-burn;}
.hard-light {mix-blend-mode: hard-light;}
.soft-light {mix-blend-mode: soft-light;}
.difference {mix-blend-mode: difference;}
.exclusion {mix-blend-mode: exclusion;}
.hue {mix-blend-mode: hue;}
.saturation {mix-blend-mode: saturation;}
.color {mix-blend-mode: color;}
.luminosity {mix-blend-mode: luminosity;}
</style>
<div class="box">
<img src="https://source.unsplash.com/random" alt="이미지" class="normal">
<img src="https://source.unsplash.com/random" alt="이미지" class="multiply">
<img src="https://source.unsplash.com/random" alt="이미지" class="screen">
<img src="https://source.unsplash.com/random" alt="이미지" class="overlay">
<img src="https://source.unsplash.com/random" alt="이미지" class="darken">
<img src="https://source.unsplash.com/random" alt="이미지" class="lighten">
<img src="https://source.unsplash.com/random" alt="이미지" class="color-dodge">
<img src="https://source.unsplash.com/random" alt="이미지" class="color-burn">
<img src="https://source.unsplash.com/random" alt="이미지" class="hard-light">
<img src="https://source.unsplash.com/random" alt="이미지" class="soft-light"> <img src="https://source.unsplash.com/random" alt="이미지" class="difference">
<img src="https://source.unsplash.com/random" alt="이미지" class="exclusion">
<img src="https://source.unsplash.com/random" alt="이미지" class="hue">
<img src="https://source.unsplash.com/random" alt="이미지" class="saturation">
<img src="https://source.unsplash.com/random" alt="이미지" class="color">
<img src="https://source.unsplash.com/random" alt="이미지" class="luminosity">
</div>
<script>
// class 속성의 속성값과 동일값 갖는 title 속성 생성
document.addEventListener('DOMContentLoaded', function() {
var images = document.querySelectorAll('.box img');
images.forEach(function(image) {
var className = image.getAttribute('class');
image.setAttribute('title', className);
});
});
</script>
결과보기