$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CSSのclip-pathの紹介
Search
Yohei Iino
March 01, 2022
Design
0
800
CSSのclip-pathの紹介
Yohei Iino
March 01, 2022
Tweet
Share
More Decks by Yohei Iino
See All by Yohei Iino
1年半放置したExpo製アプリを最新化してみた
wheatandcat
0
66
作成中のFlutterアプリの中間発表
wheatandcat
0
56
最近読んだ技術書を簡単紹介
wheatandcat
0
77
ユニバーサルリンク/アプリリンクを使ってQRコードでゲストログインできるようにする
wheatandcat
0
270
Firebase App Checkを実装したので紹介
wheatandcat
0
190
PlanetScaleの無料プランがなくなるので、NeonとTiDBを試してみた
wheatandcat
0
330
Flutter HooksとRiverpodの解説
wheatandcat
0
450
T3 Stack(応用編: Next Auth & SSRの実装紹介)
wheatandcat
1
360
App Routerの紹介
wheatandcat
0
110
Other Decks in Design
See All in Design
Franks Myth
gfht1
0
360
一次体験を起点にしたUX改善の取り組み / Direct Experience Driven UX Improvements
bitkey
PRO
0
310
kintone Style Book
kintone
5
7.6k
DESIGNEAST 2025 A-3
_kotobuki_
0
110
Treasure_Hunting
solmetts
0
110
チームをデザイン対象にする / Design for your team
kaminashi
0
140
「UXとUIの違い」v2
shirasu3
0
310
ユーザー像を「みてね」らしく可視化する 家族アルバムみてねUXリサーチチームの取り組み
mixi_design
PRO
3
430
プロダクトデザイナーに学ぶ、『見る気が起きる』ダッシュボードの作り方 / Creating Engaging Dashboards: Lessons from Product Designers
yamamotoyuta
0
260
1年目デザイナーが実践する、チーム貢献のための2つのアプローチ
kinomidesign
0
140
Figmaレクチャー会Part2 もっと使いこなす編@千株式会社 社内勉強会
designer_no_pon
0
170
逆向きUIの世界〜AndroidアプリのRTL言語対応〜
akatsuki174
1
670
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
54
7.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
A Modern Web Designer's Workflow
chriscoyier
698
190k
Docker and Python
trallard
47
3.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Mobile First: as difficult as doing things right
swwweet
225
10k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Site-Speed That Sticks
csswizardry
13
990
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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 のサポート期間が終わったら、色々な場面でも使用しても良さそう。
ご清聴ありがとうございました