Not to mention technology, see the effect of implementation, and the original (left) compared to the ' light ' irradiation (right) under the younger sister is not more attractive!!
Then let's talk about the technology implementation process that everyone cares about.
In fact, this is my CSS property mix-blend-mode When I came up with the implementation of the image, the following first introduced Mix-blend-mode this attribute, "Blend-mode" is the meaning of mixed mode, The CSS property function is to "mix" the element content with the background of the element and the following elements.
attribute values and their effects are as follows:
1Mix-blend-mode:normal;//Normal2mix-blend-mode:multiply;//Multiply3Mix-blend-mode:screen;//Color Filter4Mix-blend-mode:overlay;//Overlay5Mix-blend-mode:darken;// Darken6Mix-blend-mode:lighten;//Lighten7Mix-blend-mode:color-dodge;//Color Dodge8Mix-blend-mode:color-burn;//Color Burn9Mix-blend-mode:hard-light;//Strong LightTenMix-blend-mode:soft-light;//Soft Light OneMix-blend-mode:difference;//Difference Value AMix-blend-mode:exclusion;//Exclude -Mix-blend-mode:hue;//Hue -Mix-blend-mode:saturation;//Saturation Level theMix-blend-mode:color;//Color -mix-blend-mode:luminosity;//Brightness - -mix-blend-mode:initial;//Initial +Mix-blend-mode:inherit;//Inheritance -Mix-blend-mode:unset;//Restoration
The implementation of this effect is composed of the upper left and (transparent background).
So, the Mix-blend-mode value used here is overlay. The code is as follows:
1<! DOCTYPE html>234<meta charset= "UTF-8" >5<title>Document</title>67<style>8*{padding:0;margin:0;}9 . beauty{Ten height:1000px; One width:667px; ABackground-image:url (./beauty.jpg); -border-radius:100%; - position:relative; theTransform:scale (0.5); - } - . Beauty img{ -height:200%; +width:200%; -mix-blend-Mode:overlay; + Position:absolute; Atop:-90%; atleft:-105%; - } -</style> -<body> -<div class= ' Beauty ' > - in</div> -</body> to<script> +</script> -Let the two pictures overlap, and then set the blending method to overlap, it's that simple! Ha ha!
Students who want the original material can leave the mailbox, I will send you
Pure CSS to achieve the light effect of the picture, high-force picture display