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のclip-pathの紹介
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yohei Iino
March 01, 2022
Design
0
820
CSSのclip-pathの紹介
Yohei Iino
March 01, 2022
Tweet
Share
More Decks by Yohei Iino
See All by Yohei Iino
1年半放置したExpo製アプリを最新化してみた
wheatandcat
0
77
作成中のFlutterアプリの中間発表
wheatandcat
0
63
最近読んだ技術書を簡単紹介
wheatandcat
0
83
ユニバーサルリンク/アプリリンクを使ってQRコードでゲストログインできるようにする
wheatandcat
0
340
Firebase App Checkを実装したので紹介
wheatandcat
0
220
PlanetScaleの無料プランがなくなるので、NeonとTiDBを試してみた
wheatandcat
0
360
Flutter HooksとRiverpodの解説
wheatandcat
0
480
T3 Stack(応用編: Next Auth & SSRの実装紹介)
wheatandcat
1
370
App Routerの紹介
wheatandcat
0
120
Other Decks in Design
See All in Design
Shaolin_Showdown
solmetts
0
290
decksh object reference
ajstarks
2
1.5k
組織の右腕として共創する ー デザインと経営の二つの視点から見えた、新しい支援のかたち/ Designship2025_Nishimura
root_recruit
0
280
mount_company_profile
mount_inc
0
4.9k
デザイナーとエンジニアで 同じ山に登ろう
moco1013
0
140
Figmaレクチャー会Part2 もっと使いこなす編@千株式会社 社内勉強会
designer_no_pon
1
260
新規AIプロダクトで、事前に知るべきだった3つの壁 〜医療AIを1年間作って、従来の開発が通用しなかった話〜 / Three Walls in Building AI Products
shikichee
2
3.2k
コムデマネージャーがプロダクトデザインに挑戦した。むずかしくて楽しかった。
payatsusan213
0
200
2026年の勢い / Momentum for 2026
bebe
0
340
Figmaレクチャー会Part1 基本のき編@千株式会社 社内勉強会
designer_no_pon
2
250
AI時代に問われる、リサーチの感受性──地域⇄大企業の現場から見えた「違和感」との向き合い方
muture
PRO
0
420
Meet, Learn, Grow × AI ― コミュニティで加速するスキル循環 「コミュニティと関わり方」
tame
1
370
Featured
See All Featured
Optimizing for Happiness
mojombo
379
71k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
How to make the Groovebox
asonas
2
1.9k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
99
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
The Limits of Empathy - UXLibs8
cassininazir
1
210
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
4 Signs Your Business is Dying
shpigford
187
22k
Transcript
CSS clip-path の紹介 Press Space for next page
自己紹介 📝 飯野陽平(wheatandcat ) 🏢 フリーランスエンジニア(シェアフル株式会社CTO ) 💻 Blog: https://www.wheatandcat.me/
📚 Booth: https://wheatandcat.booth.pm/ 🛠 今までに作ったもの memoir ペペロミア Atomic Design Check List
clip-path とは clip-path はCSS のプロパティで、 要素のどの部分を表示するかを設定するクリッピング領域を指定できるCSS 。 具体的には、HTML の要素の一部をトリミングしたり、SVG のPath
を指定して動的に表示することができる。 MDN clip-path
対応ブラウザ https://caniuse.com/?search=clip-path
使っても大丈夫か? IE11 以外のブラウザは、ほぼサポート済み IE11 のサポートも2022 年6 月15 日で終了なので、それ以降は使ってもOK 👌
clip-path に設定できる値 値 内容 inset 四角形を設定 circle 丸を設定 ellipse 楕円を設定
polygon 多角形を設定
実際にサンプルを作ってみた
斜め線を使用したデザイン https://try-css.vercel.app/clippath/section
clip-path で四角形を書く https://try-css.vercel.app/clippath/inset
clip-path で丸を書く https://try-css.vercel.app/clippath/circle
clip-path で三角形を書く https://try-css.vercel.app/clippath/triangle
clip-path でカードにリボンをつける https://try-css.vercel.app/clippath/ribbon
clip-path でボタンにアニメーションをつける https://try-css.vercel.app/clippath/button
clip-path で画像を切り抜く https://try-css.vercel.app/clippath/image
clip-path を使ってデザインしてみる https://try-css.vercel.app/clippath/screen
clip-path を使ってデザインしてみる https://try-css.vercel.app/clippath/screen
おまけ : clip-path でサーチライトっぽいアニメーション https://try-css.vercel.app/clippath/light
まとめ 今までcss のborder で無理やり実装していた箇所が、clip-pat でスッキリかけるようになった。 アニメーションと組み合わせれば色々できる https://digipress.info/tech/revealing-text-by-clip-path/ IE11 のサポート期間が終わったら、色々な場面でも使用しても良さそう。
ご清聴ありがとうございました