Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CSSでblend-modeを使ってみよう!
Search
Emi MATSUDA
November 29, 2019
Programming
0
220
CSSでblend-modeを使ってみよう!
https://tambourine.connpass.com/event/149622/
上記イベントで話したスライドです
Emi MATSUDA
November 29, 2019
Tweet
Share
More Decks by Emi MATSUDA
See All by Emi MATSUDA
コワくないmicroInteractionの考え方・作り方
matsudaemi
0
120
コワくないJS:オープニングトーク
matsudaemi
1
220
コワくない.js1@フレームワークの話
matsudaemi
0
200
リアルパンくずナビLT
matsudaemi
0
730
Other Decks in Programming
See All in Programming
Beyond ORM
77web
8
1.1k
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
技術的負債と向き合うカイゼン活動を1年続けて分かった "持続可能" なプロダクト開発
yuichiro_serita
0
130
Spatial Rendering for Apple Vision Pro
warrenm
0
120
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
560
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
280
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
490
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
1
380
php-conference-japan-2024
tasuku43
0
350
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
950
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
280
ドメインイベント増えすぎ問題
h0r15h0
2
400
Featured
See All Featured
RailsConf 2023
tenderlove
29
940
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Automating Front-end Workflow
addyosmani
1366
200k
Site-Speed That Sticks
csswizardry
2
190
Producing Creativity
orderedlist
PRO
342
39k
Typedesign – Prime Four
hannesfritz
40
2.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Transcript
CSSͰblend-modeΛͬͯΈΑ͏ʂ 2019.11.29(fri) 18:00~ tambourine inc. enginner : MATSUDA Emi
ϑϩϯτଆͰɺը૾Λ৮Δඞཁ͕͋Δ߹
ϑϩϯτଆͰɺը૾Λ৮Δඞཁ͕͋Δ߹ • Ϩεϙϯγϒ Πϝʔδ • τϦϛϯά • ϦαΠζ • มܗ
ϑϩϯτଆͰɺը૾Λ৮Δඞཁ͕͋Δ߹ • Ϩεϙϯγϒ Πϝʔδɿpictureཁૉɺsrcsetଐੑ • τϦϛϯάɿobject-fitʢclipফ໓ʣϓϩύςΟ • ϦαΠζɿwidthͱ͔max-widthͱ͔ͷϓϩύςΟ • มܗɿtransformϓϩύςΟ
͜ͳ͍ͩґཔ͞Εͨͭ • ʛɾωɾʣ{ ϩΰɺޫΒͤͯɻ
͜ͳ͍ͩґཔ͞Εͨͭ • ʛɾωɾʣ{ ϩΰɺޫΒͤͯɻ • …ɻ } ʢɾωɾ
͜ͳ͍ͩґཔ͞Εͨͭ • ͞Εͨϩΰ
͜ͳ͍ͩґཔ͞Εͨͭ • ͞Εͨϩΰ • ࠇഎܠ͖ͭpng
͜ͳ͍ͩґཔ͞Εͨͭ • ͞Εͨϩΰ • ࠇഎܠ͖ͭpng • …ɻ } ʢɾωɾ
CSSͰͳΜͱ͔͢Δͧɻ
ը૾ʹରͯ͠ޮՌΛ༩͑Δ
ը૾ʹରͯ͠ޮՌΛ༩͑Δ • filterϓϩύςΟ • blend-modeϓϩύςΟ
ը૾ʹରͯ͠ޮՌΛ༩͑Δ • filterϓϩύςΟɿը૾શମʹରͯ͠ޮՌΛ༩͑Δ • blend-modeϓϩύςΟɿ৭ͷॏͳΓʹޮՌΛ༩͑Δ
ը૾ʹରͯ͠ޮՌΛ༩͑Δ • filterϓϩύςΟɿը૾શମʹରͯ͠ޮՌΛ༩͑Δ • blend-modeϓϩύςΟɿ৭ͷॏͳΓʹޮՌΛ༩͑Δ
ը૾ʹରͯ͠ޮՌΛ༩͑Δ • ཁɺPhotoshopͷίϨ
blend-modeϓϩύςΟͱ • background-blend-mode • mix-blend-mode
blend-modeϓϩύςΟͱ • background-blend-modeɿཁૉͷഎܠը૾ɾഎܠ৭ΛϒϨ ϯυ͢Δͱ͖ʹ͏ • mix-blend-modeɿޙΖʹ͋Δཁૉͱͷը૾ɾഎܠ৭Λϒ Ϩϯυ͢Δͱ͖ʹ͏
blend-modeϓϩύςΟͱ • background-blend-modeɿཁૉͷഎܠը૾ɾഎܠ৭ΛϒϨ ϯυ͢Δͱ͖ʹ͏ • mix-blend-modeɿޙΖʹ͋Δཁૉͱͷը૾ɾഎܠ৭Λϒ Ϩϯυ͢Δͱ͖ʹ͏
blend-modeϓϩύςΟͱ • demo • https://jsfiddle.net/4ghyzvcp/53/
͜ͳ͍ͩґཔ͞Εͨͭ • ͞Εͨϩΰ • ࠇഎܠ͖ͭpng
͜ͳ͍ͩґཔ͞Εͨͭ • ͞Εͨϩΰ • demo • https://jsfiddle.net/xnza8hbk/9/
ҙ • ͑Δͱ͜ΖΛΘ͖·͑Α͏ɻ • https://caniuse.com/#search=mix-blend-mode
ҙ • ͍ͯ͠ͳ͍ը૾ͷΘΓʹ͏ͷNG • ͲΜͳڥͰɺใਖ਼͑͘͠ΔྗΛɻ • ϓϥεΞϧϑΝͷ০ʹ͏ͳΒ͍͍͔ͳʔɻ͘Β͍ɻ
·ͱΊ • ͓ࣄ͍ΖΜͳཁٻʹԠ͑ͳ͍ͱ͍͚ͳ͍ • ը૾ΛCSSͰ͍͡Δ͜ͱՄೳ • ͪΐͬͱͨ͠ΤϑΣΫτՃ͑ΔͷͰ͋ΕɺCSSศར • Γ͗͢Α͘ͳ͍
͓ΘΓ • ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ