CSS Blend Mode

推荐观看视频:Una Kravets: CSS Blend Modes

Notes/Caveats

先在caniuse上看一下兼容情况:

搜索blend后的结果

background blend

tips:
  1. No Interpolation (x)
  2. Combine With Filters (√)

What are Blend Modes

To combine or mix pixels with each other through a series of algorithms and those also vary based on the blend mode. There are a lot of different blend modes out there specifically in CSS. We have a few different blend mode groups.

Darken group

All darken based on the active layer on top of the background layer

  • Darken (Based on RGB value and get the darker color of the color channels)
  • Multiply (Acts as a projector: A * B)
  • Color Burn
Lighten Group
  • Lighten (Based on RGB value and get the lighter color of the color channels)
  • Screen (Exact opposite of Multipy: 1 - (1 - A) * (1 - B) )
  • Color Dodge
Contrast Group
  • Overlay
  • Soft Light
  • Hard Light
Inversion Group
  • Difference ( |A - B| )
  • Exclusion
Component Group
  • Hue
  • Saturation
  • Color (Actually combines multiple blend modes. It combines the hue and the saturation and just mixes the luminosity behind it.)
  • Luminosity

How Blend Modes Work

The Utility of Blend Modes

1. Simplicity
2. Uniformity

You can recreate any type of effect just by using CSS

3. Consistency
4. Performance

You can get a 17 to 23 percent image savings by doing the transformation (with white and black).
You can remove the contrast of a image on your own by PS, and then reapply it in a browser with contrast(2) with CSS filters and blend modes.

5. Creativity

Stop getting inspiration for websites from other websites.
Just because it's the norm, doesn't mean its the best solution.

6. Empathy
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,179评论 0 10
  • 冬天的村落,像保留下来的遗迹,散发着萧瑟的气息。又像寂寥的老人,靠着墙根昏睡,日光挪移到了哪里,无察觉,也无期许。...
    月光墨墨阅读 3,401评论 5 8
  • 最近在找工作的过程中,发现企业都要求掌握小程序开发。于是,利用闲余时间就研究了一下,鉴于之前有用vue-cli开发...
    毕竟1米八阅读 9,019评论 0 4

友情链接更多精彩内容