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
Yohei Iino
March 01, 2022
Design
0
790
CSSのclip-pathの紹介
Yohei Iino
March 01, 2022
Tweet
Share
More Decks by Yohei Iino
See All by Yohei Iino
1年半放置したExpo製アプリを最新化してみた
wheatandcat
0
54
作成中のFlutterアプリの中間発表
wheatandcat
0
49
最近読んだ技術書を簡単紹介
wheatandcat
0
70
ユニバーサルリンク/アプリリンクを使ってQRコードでゲストログインできるようにする
wheatandcat
0
150
Firebase App Checkを実装したので紹介
wheatandcat
0
150
PlanetScaleの無料プランがなくなるので、NeonとTiDBを試してみた
wheatandcat
0
310
Flutter HooksとRiverpodの解説
wheatandcat
0
430
T3 Stack(応用編: Next Auth & SSRの実装紹介)
wheatandcat
1
350
App Routerの紹介
wheatandcat
0
100
Other Decks in Design
See All in Design
Liquid GlassとApp Intents
touyou
0
390
株式会社ログラス - 会社説明資料【デザイナー】/ Loglass Designer
loglass2019
1
2.6k
デザイナー向けフライル説明資料
toshiblues
0
160
Portfolio 齋藤明敏 Hiroyuki Saito_守秘義務あり
crearedesign
0
310
Spectrum Tokyo_ デザイナーが事業責任者になってみた
shin_2
0
150
不確実性の時代にみんなで試したFigma × MCP × Cursor ハンズオン
techtekt
PRO
7
910
ブランドパーソナリティ言語化における生成AI活用の実際
h0sa
0
310
Bulletproof Design System with TypeScript
takanorip
7
4.2k
Мышление дизайнера историями. Как текстовые модели человеческого поведения помогают проектировать
ashapiro
0
420
Ana Cortes Visual Development Portfolio 2025
haruanleb
0
120
【PoCで終わらない】運用フェーズまで見据えたAI駆動UIデザイン/フロントエンド開発実践
kitami
1
390
AIの実践とコミュニケーションデザインの意義 / AI practice and the significance of communication design
bebe
0
860
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
27
2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
189
55k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Visualization
eitanlees
148
16k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
How STYLIGHT went responsive
nonsquared
100
5.8k
Being A Developer After 40
akosma
91
590k
Facilitating Awesome Meetings
lara
56
6.6k
Site-Speed That Sticks
csswizardry
11
880
The Pragmatic Product Professional
lauravandoore
36
6.9k
Mobile First: as difficult as doing things right
swwweet
224
10k
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 のサポート期間が終わったら、色々な場面でも使用しても良さそう。
ご清聴ありがとうございました