Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
モダンCSS教習所
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ageofrage
August 07, 2024
34
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
モダンCSS教習所
ageofrage
August 07, 2024
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
Unsuck your backbone
ammeep
672
58k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
620
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
RailsConf 2023
tenderlove
30
1.6k
Accessibility Awareness
sabderemane
1
250
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Transcript
モダンCSS教習所 あげ
安心のMDNの提供でお送りします
color-mix()
color-mix() color-mix() 関数記法は 2 つの <color> 値を採り、指定された色空間の指定された量で 混合した結果を返します。
color-mix() はこんな時に便利 カラー増やしたくないけど、既存のカラーを元にグラデーション作りたい background: linear-gradient( 45deg, color-mix(in srgb, var(--bg), black
36%), var(--bg, #cef) );
1 問1. 以下のコードで出力される色に使い色はどれか color-mix(in srgb, #f0f 50%, #0f0) 2 3
1 正解 問1. 以下のコードで出力される色に使い色はどれか color-mix(in srgb, #f0f 50%, #0f0) 2
color-mix(in srgb, #f0f 50%, #000) 3 color-mix(in srgb, #fff 50%, #0f0)
light-dark()
light-dark() (中略)ユーザーがライト色またはダーク色のテーマをリクエストしたか検出することによって、 2 つの色の選択 肢のいずれかを返します。(中略)これは実験的な機能です。
light-dark() はこんな時に便利 CSS変数に入れてワンライナーで対応 --bg: #cef; @media (prefers-color-scheme: dark) { --bg:
#114; } /* これでOK */ --bg: light-dark(#cef, #114);
問2. light-dark() は ios17.5 から利用できる 利用できる 利用できない
問2. light-dark() は ios17.5 から利用できる 利用できる 利用できない
transform ショートハンド
transform ショートハンド (≠ 正式名) 今まで、transform: scale(0.5) rotate(45deg); と書いていたものが、transform部分を省略できるようになった
問3. 以下のコードに近い図形を選びなさい .class { /* サイズと色は割愛 */ rotate: 45deg; skew:
45deg; } 2 3 1
1 問3. 以下のコードに近い図形を選びなさい .class { /* サイズと色は割愛 */ rotate: 45deg;
skew: 45deg; } 2 ※skew: はできない 3 正解
三角関数
三角関数 sin(), cos(), tan(), acos(), asin(), atan(), atan2() などの三角関数が使える
三角関数 はこんな時に便利 • 複雑なアニメーションをしたい時 • 0 ▶ 1 ▶ 0
▶ -1 ▶ 0… みたいな繰り返すアニメーションしたい時(sin, cos) • 8の字描きたい時 ……など色々
問4. 以下のコードに近いアニメーションを選びなさい
と言いたいところですが、 ただの数学問題になるので割愛
最後に
今日あつかったモダンCSSを 全部使ってみました
https://codepen.io/agehara/pen/eYowyeW
None
ありがとうございました!