CSS|CSS Blend Mode
推荐观看视频:Una Kravets: CSS Blend ModesNotes/Caveats
【CSS|CSS Blend Mode】先在caniuse上看一下兼容情况:
文章图片
搜索blend后的结果
文章图片
background blend
tips:
- No Interpolation (x)
- Combine With Filters (√)
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 (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
- Overlay
- Soft Light
- Hard Light
- Difference ( |A - B| )
- Exclusion
- Hue
- Saturation
- Color (Actually combines multiple blend modes. It combines the hue and the saturation and just mixes the luminosity behind it.)
- Luminosity
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
推荐阅读
- 标签、语法规范、内联框架、超链接、CSS的编写位置、CSS语法、开发工具、块和内联、常用选择器、后代元素选择器、伪类、伪元素。
- 3.css浮动
- 使用sqlalchemy|使用sqlalchemy orm 的model序列化,解决返回model的异常
- css|我用css精灵图拼接了自己的英文名字,不会还有人不知道精灵图技术吧()
- css|css三角的做法及其案例
- css|css中元素的显示与隐藏
- CSS兼容性笔记
- 微信小程序____CSS篇之定位(position)及浮动(float)
- 18,页面优化
- Web前端如何学习?