html¿¡¼ À̹ÌÁö¸¦ ¿øÇÏ´Â Ä®¶ó·Î ¹Ù²Ù·Á¸é ÀÚ½Ä div¸¦ Çϳª ´õ ¸¸µé¸é µÈ´Ù. ¸Ç À§¿¡ ÀÖ´Â À̹ÌÁö°¡ ¿øº» À̹ÌÁö, ¾Æ·¡´Â ÀÚ½ÄÀÇ ¹é±×¶ó¿îµå Ä®¶ó¸¦ red, green, blue·Î ÁöÁ¤ÇßÀ»¶§, °á°úÀÌ´Ù. <style>
.parent_box { position: absolute; width: 200px; height: 200px; background:url('grass.jpg') no-repeat; background-size: 100% 100%; } #child_box { width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.7); } </style> <body> <!--¿øº» À̹ÌÁö--> <div class='parent_box' style='left:500px; top:50px'></div> <!-- red background color--> <div class='parent_box' style='left:100px; top:300px'> <div id='child_box'></div> </div> <!-- green background color--> <div class='parent_box' style='left:500px; top:300px'> <div style='width:100%; height:100%; background-color:rgba(0, 255, 0, 0.7)'></div> </div> <!-- blue background color--> <div class='parent_box' style='left:900px; top:300px'> <div style='width:100%; height:100%; background-color:rgba(0, 0, 255, 0.7)'></div> </div> </body> ÀÚ½Ä ¿ä¼Ò´Â ´ÙÀ½°ú °°ÀÌ width, height, background-color¸¸ ÁöÁ¤ÇÑ´Ù. #child_box { width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.7); } background_color.html ÆÁ) rgba¿Í opaticy Â÷ÀÌÁ¡ rgba : rgba¸¦ ¼±¾ðÇÑ ¿ä¼Ò¿¡¸¸ Àû¿ëÀÌ µÇ¸ç »ó¼ÓÀÌ ¾ÈµÈ´Ù.
opacity : opacity¸¦ ¼±¾ðÇÑ ¿ä¼Ò¿Í »ó¼ÓÇÑ ÀڽıîÁö Àû¿ëÀÌ µÈ´Ù. ½Ã°£ÀÌ Áö³ÈÄ¿¡ background-blend-mode¿Í mix-blend-mode°¡ Àִٴ°ÍÀ» ¾Ë°Ô µÇ¾ú´Ù. div 2°³ »ç¿ëÇÑ°Í°ú Ä®¶ó°¡ Â÷ÀÌ°¡ ³´Ù. background-blend-mode¸ðµå ¼Ó¼º¿¡´Â ¿©·¯°¡Áö°¡ ÀÖ´Ù.div Çϳª·Î Á¶ÇÕ ÇÒ¼ö°¡ ÀÖ´Ù. CSS
.multiimage-color { position: absolute; width: 200px; height: 200px; background: url('100.png') no-repeat, url('grass.jpg') no-repeat; background-size: 100% 100%; background-color: rgba(255, 0, 0, 0.7); background-blend-mode: multiply; } HTML <div class='multiimage-color' style='left:1000px; top:400px;' >multiply</div> ´Ù¿î·Îµå: background_blend_mode.html mix-blend-mode¸ðµå ¼Ó¼º¿¡´Â ¿©·¯°¡Áö°¡ ÀÖ´Ù.div°¡ 2°³ ÀÌ»ó µÇ¾î Á¶ÇÕ ÇÒ¼ö°¡ ÀÖ´Ù. CSS
.container { position: absolute; width: 200px; height: 200px; background: url('grass.jpg') no-repeat; background-size: 100% 100%; } .container-inner { width: 100%; height: 100%; background-color: red; mix-blend-mode: overlay; } HTML <div class="container"> <div class="container-inner"></div> </div> ´Ù¿î·Îµå: mix_test.html |