#css中級 search results

もう少しamimation付け加えた✨ #Codejump #CSS中級


画像にGradient Overlayを追加する方法🎶 サンプルコード依頼があったので解放します💻 #Codejump #CSS中級

Robby_WebDesign's tweet image. 画像にGradient Overlayを追加する方法🎶
サンプルコード依頼があったので解放します💻

#Codejump #CSS中級

CSS小技✨ <img>タグに関する名言🎶 1️⃣imgは画像の窓。srcはその景色、altはその説明 2️⃣見える画像はsrc、見えない心遣いはalt 3️⃣altはSEOにもAccessibilityにも効く最強パラメータ 4️⃣imgは自己紹介ができない、altで語らせよう 5️⃣imgはinline、でもmarginが効く特別枠 #Codejump #CSS中級


CSS小技✨ 1つの要素に2つの画像🎶 transform-style: preserve-3d background-size: 400% background-position: 0% 0% ~ 100% 0% backface-visibility: hidden transform: rotateY(0deg ~ 180deg) #Codejump #CSS中級 #Web制作


CSS小技✨ 煙のように消えていく🎶 span { display: inline-block span:nth-child(n) { animation-delay --tx: 〇px --ty: 〇px @keyframes { 100% { transform: translate(var(--tx), var(--ty)) scale() opacity: 0 filter: blur() text-shadow.. #Codejump #CSS中級


CSS小技✨ 出たり戻ったり跳ねたり...🎶 span { display: inline-block transform: translateY(100%) background-clip: text color: transparent animation span:nth-child(n) { animation-delay background-image: linear-gradient(to left,color1,color2) #Codejump #CSS中級


CSS小技✨ bodyにmin-height: 100vh? 1️⃣htmlにmin-height: 100vhを指定しても、 ほぼ意味がない。 htmlはbodyを内包して伸びるから🤔 2️⃣PageのContentsの高さを最低でもbrowserの 高さにしたいなら、Contentsを直接持つ bodyに指定するほうが正しい👍 #Codejump #CSS中級


CSS小技✨ object-view-box + clip-path + rotate + scale🎶 hoverでタイムラグつけながら順番にtransition💻 1️⃣object-view-box → キュッとズラして切取り範囲絞る 2️⃣clip-path → 四隅をさらに丸める 3️⃣rotate → ぐるっと一周回転 4️⃣scale → ズームアップ #Codejump #CSS中級


CSS小技✨ 森下とサトテルが入れ替わる🎶 1枚の画像から2人が登場するアニメ⚾️ clip-path × transform で魅せる! 画像3枚に見えて、実は1枚。 #阪神タイガース #CSS中級 #Codejump


CSS小技✨ object-position + object-view-box🎶 img { object-position: 0% 0% object-fit: cover object-view-box: inset(0) img:hover { object-position: 100% 70% object-view-box: inset(50% 20% 20% 20%) #Codejump #CSS中級


CSS小技✨ object-fit + object-position + object-view-box & background🎶 imgタグでobject-fit object-position object-view-box 但しimgタグだけでは擬似要素が設定できないため、 囲み要素が必要 ::before → background pointer-events <div><img src="画像"></div> #Codejump #CSS中級


CSS小技✨ color値で奥行🎶 rgba(*赤*、 *緑*、*青、アルファ*) alphaパラメーターで、0.0(完全に透明)から 1.0(まったく透明ではない)までの数値で奥行💻 color: rgba(9, 96, 153, 0.2~0.8) :hover { color: #e74c3c #CodeJump #CSS中級


背景切替にblurを一瞬入れると… 映画のシーン転換みたいな演出に🎬 擬似要素&clip-pathでここまでできるの面白い😎 #Codejump #CSSアニメーション #CSS中級


CSS小技✨ 画像にGradient Overlayを追加する方法🎶 1️⃣::beforeを使う → 冗長になりやすい 2️⃣border-image + fillを使う → ややトリッキー 3️⃣Gradientと画像をbackgroundでLayer → 短くて明快 #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
画像にGradient Overlayを追加する方法🎶
1️⃣::beforeを使う → 冗長になりやすい
2️⃣border-image + fillを使う → ややトリッキー
3️⃣Gradientと画像をbackgroundでLayer → 短くて明快

#Codejump #CSS中級

CSS小技✨ なぜ流動系が流行ってる? 1️⃣media query地獄からの解放   Breakpointsを何度も書かずに済む 2️⃣Minimal and scalable   Utility・token化に相性抜群 3️⃣Designが自然に馴染む Smartphone・Tablet・Desktopで違和感なく展開 ✨rootにclamp() や min() / max() #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
なぜ流動系が流行ってる?
1️⃣media query地獄からの解放
  Breakpointsを何度も書かずに済む
2️⃣Minimal and scalable
  Utility・token化に相性抜群
3️⃣Designが自然に馴染む
       Smartphone・Tablet・Desktopで違和感なく展開
✨rootにclamp() や min() / max()
#Codejump #CSS中級

CSS小技✨ 自分ずっとやってたけど非推奨だった話🎶 background: url(img) no-repeat center/cover; って書いてたけど、実は順番NGだった…! 正しくは background: center/cover url(img) no-repeat; 詳しくはCurbonで👇 #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
自分ずっとやってたけど非推奨だった話🎶
 background: url(img) no-repeat center/cover;
って書いてたけど、実は順番NGだった…!
正しくは
 background: center/cover url(img) no-repeat;
詳しくはCurbonで👇

#Codejump #CSS中級 #Web制作

CSS小技✨ popover~backdrop🎶 @starting-style { [popover]:popover-open, [popover]::backdrop { opacity: 0 #open::backdrop { background: url() center/cover blue background-blend-mode: luminosity... #Codejump #CSS中級


背景切替にblurを一瞬入れると… 映画のシーン転換みたいな演出に🎬 擬似要素&clip-pathでここまでできるの面白い😎 #Codejump #CSSアニメーション #CSS中級


CSS小技✨ 森下とサトテルが入れ替わる🎶 1枚の画像から2人が登場するアニメ⚾️ clip-path × transform で魅せる! 画像3枚に見えて、実は1枚。 #阪神タイガース #CSS中級 #Codejump


CSS小技✨ <img>タグに関する名言🎶 1️⃣imgは画像の窓。srcはその景色、altはその説明 2️⃣見える画像はsrc、見えない心遣いはalt 3️⃣altはSEOにもAccessibilityにも効く最強パラメータ 4️⃣imgは自己紹介ができない、altで語らせよう 5️⃣imgはinline、でもmarginが効く特別枠 #Codejump #CSS中級


CSS小技✨ 自分ずっとやってたけど非推奨だった話🎶 background: url(img) no-repeat center/cover; って書いてたけど、実は順番NGだった…! 正しくは background: center/cover url(img) no-repeat; 詳しくはCurbonで👇 #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
自分ずっとやってたけど非推奨だった話🎶
 background: url(img) no-repeat center/cover;
って書いてたけど、実は順番NGだった…!
正しくは
 background: center/cover url(img) no-repeat;
詳しくはCurbonで👇

#Codejump #CSS中級 #Web制作

CSS小技✨ 1つの要素に2つの画像🎶 transform-style: preserve-3d background-size: 400% background-position: 0% 0% ~ 100% 0% backface-visibility: hidden transform: rotateY(0deg ~ 180deg) #Codejump #CSS中級 #Web制作


もう少しamimation付け加えた✨ #Codejump #CSS中級


画像にGradient Overlayを追加する方法🎶 サンプルコード依頼があったので解放します💻 #Codejump #CSS中級

Robby_WebDesign's tweet image. 画像にGradient Overlayを追加する方法🎶
サンプルコード依頼があったので解放します💻

#Codejump #CSS中級

CSS小技✨ 煙のように消えていく🎶 span { display: inline-block span:nth-child(n) { animation-delay --tx: 〇px --ty: 〇px @keyframes { 100% { transform: translate(var(--tx), var(--ty)) scale() opacity: 0 filter: blur() text-shadow.. #Codejump #CSS中級


CSS小技✨ object-fit + object-position + object-view-box & background🎶 imgタグでobject-fit object-position object-view-box 但しimgタグだけでは擬似要素が設定できないため、 囲み要素が必要 ::before → background pointer-events <div><img src="画像"></div> #Codejump #CSS中級


CSS小技✨ popover~backdrop🎶 @starting-style { [popover]:popover-open, [popover]::backdrop { opacity: 0 #open::backdrop { background: url() center/cover blue background-blend-mode: luminosity... #Codejump #CSS中級


CSS小技✨ 出たり戻ったり跳ねたり...🎶 span { display: inline-block transform: translateY(100%) background-clip: text color: transparent animation span:nth-child(n) { animation-delay background-image: linear-gradient(to left,color1,color2) #Codejump #CSS中級


CSS小技✨ 画像にGradient Overlayを追加する方法🎶 1️⃣::beforeを使う → 冗長になりやすい 2️⃣border-image + fillを使う → ややトリッキー 3️⃣Gradientと画像をbackgroundでLayer → 短くて明快 #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
画像にGradient Overlayを追加する方法🎶
1️⃣::beforeを使う → 冗長になりやすい
2️⃣border-image + fillを使う → ややトリッキー
3️⃣Gradientと画像をbackgroundでLayer → 短くて明快

#Codejump #CSS中級

CSS小技✨ なぜ流動系が流行ってる? 1️⃣media query地獄からの解放   Breakpointsを何度も書かずに済む 2️⃣Minimal and scalable   Utility・token化に相性抜群 3️⃣Designが自然に馴染む Smartphone・Tablet・Desktopで違和感なく展開 ✨rootにclamp() や min() / max() #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
なぜ流動系が流行ってる?
1️⃣media query地獄からの解放
  Breakpointsを何度も書かずに済む
2️⃣Minimal and scalable
  Utility・token化に相性抜群
3️⃣Designが自然に馴染む
       Smartphone・Tablet・Desktopで違和感なく展開
✨rootにclamp() や min() / max()
#Codejump #CSS中級

CSS小技✨ bodyにmin-height: 100vh? 1️⃣htmlにmin-height: 100vhを指定しても、 ほぼ意味がない。 htmlはbodyを内包して伸びるから🤔 2️⃣PageのContentsの高さを最低でもbrowserの 高さにしたいなら、Contentsを直接持つ bodyに指定するほうが正しい👍 #Codejump #CSS中級


CSS小技✨ object-position + object-view-box🎶 img { object-position: 0% 0% object-fit: cover object-view-box: inset(0) img:hover { object-position: 100% 70% object-view-box: inset(50% 20% 20% 20%) #Codejump #CSS中級


CSS小技✨ object-view-box + clip-path + rotate + scale🎶 hoverでタイムラグつけながら順番にtransition💻 1️⃣object-view-box → キュッとズラして切取り範囲絞る 2️⃣clip-path → 四隅をさらに丸める 3️⃣rotate → ぐるっと一周回転 4️⃣scale → ズームアップ #Codejump #CSS中級


CSS小技✨ color値で奥行🎶 rgba(*赤*、 *緑*、*青、アルファ*) alphaパラメーターで、0.0(完全に透明)から 1.0(まったく透明ではない)までの数値で奥行💻 color: rgba(9, 96, 153, 0.2~0.8) :hover { color: #e74c3c #CodeJump #CSS中級


CSS小技✨ イトメンの幸福の黄色い箱プレゼントキャンペーン 当たった🎶 食べたことのないラーメン🍜もある! hover前 object-view-box: inset(0%) :hover object-view-box: inset(28% 60% 42% 0) このようにhover前とhover後にobject-view-box 設定すればtransition効く💻 #Codejump #CSS中級


CSS小技✨ Webサイトをlight themeとdark theme対応 :root:has([value="1"]:checked) { color-scheme: light :root:has([value="2"]:checked) { color-scheme: dark p { color: light-dark(blue,hotpink) background: light-dark(hotpink,blue).. #Codejump #CSS中級


CSS小技✨ hover clip-path🎶 hover on off でtransition変える💻 div { background: url() div::before { background-color: rgba(255,255,255,.5) div::after { clip-path: inset() filter: brightness(1.5) div:hover::after { clip-path: inset(.. round 20px) #Codejump #CSS中級


No results for "#css中級"

画像にGradient Overlayを追加する方法🎶 サンプルコード依頼があったので解放します💻 #Codejump #CSS中級

Robby_WebDesign's tweet image. 画像にGradient Overlayを追加する方法🎶
サンプルコード依頼があったので解放します💻

#Codejump #CSS中級

CSS小技✨ align-content: center🎶 display: flexやdisplay: gridを指定しなくても block要素内のcontentsを垂直方向に中央揃えに💻 「block要素での垂直方向の中央配置」という機能が 新しく追加された👍 Chrome 123~、Edge 123~、Safari 17.4~ #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
align-content: center🎶
display: flexやdisplay: gridを指定しなくても
block要素内のcontentsを垂直方向に中央揃えに💻
「block要素での垂直方向の中央配置」という機能が
新しく追加された👍

Chrome 123~、Edge 123~、Safari 17.4~

#Codejump #CSS中級 #Web制作

CSS小技✨ font-family: "Lato", sans-serif🎶 Latoは、ポーランドのデザイナー、 ウカシュ・ジェジックによって2010年に デザインされたサンセリフ体のフォント💻 好きなフォントの1つです☘️ #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
font-family: &quot;Lato&quot;, sans-serif🎶
Latoは、ポーランドのデザイナー、
ウカシュ・ジェジックによって2010年に
デザインされたサンセリフ体のフォント💻
好きなフォントの1つです☘️
#Codejump #CSS中級 #Web制作

CSS小技✨ blurをかけると縁がぼやけてしまう場合の解決策🎶 1️⃣左右画像 background: url() center/cover filter: blur(5px) 2️⃣右画像 clip-path: inset(0) 👍 #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
blurをかけると縁がぼやけてしまう場合の解決策🎶
1️⃣左右画像
      background: url() center/cover
      filter: blur(5px)
2️⃣右画像
      clip-path: inset(0) 👍

#Codejump #CSS中級 #Web制作

CSS小技✨ 使い勝手悪い::first-letter🎶 上段:p::first-letter: color: red    半角文字は2文字選択されてしまう 下段:p::first-letter: font-size: 6rem     font-sizeを変更すると上手く行く     transform(scaleやrotateなどは効かない) #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
使い勝手悪い::first-letter🎶
上段:p::first-letter: color: red
      半角文字は2文字選択されてしまう
下段:p::first-letter: font-size: 6rem
    font-sizeを変更すると上手く行く
    transform(scaleやrotateなどは効かない)
#Codejump #CSS中級 #Web制作

CSS小技✨ grid layoutとflexbox layout🎶 1️⃣Left  display: flex  gap: 10px  justify-content: center  place-items: center👎  2️⃣Right  display: flex  gap: 10px  justify-content: center  align-items: center👍 place-items は flexbox layoutでは非推奨 #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
grid layoutとflexbox layout🎶
1️⃣Left
 display: flex
 gap: 10px
 justify-content: center
 place-items: center👎 
2️⃣Right
 display: flex
 gap: 10px
 justify-content: center
 align-items: center👍
place-items は flexbox layoutでは非推奨
#Codejump #CSS中級

CSS小技✨ display: flexとinline-flex🎶 1️⃣flex 親要素の幅全体を占有、前後要素を改行配置 2️⃣inline-flex 子要素の幅に合わせて配置、前後要素と横並び配置 3️⃣要素間の余白 ul の親要素でfont-size: 0を設定   ul で font-size をReset #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
display: flexとinline-flex🎶
1️⃣flex
       親要素の幅全体を占有、前後要素を改行配置 
2️⃣inline-flex
       子要素の幅に合わせて配置、前後要素と横並び配置
3️⃣要素間の余白
       ul の親要素でfont-size: 0を設定
    ul で font-size をReset
  #Codejump #CSS中級

CSS小技✨ width: autoと%🎶 1️⃣auto   ・初期値   ・paddingやborder を足すと、その分の幅が増える 2️⃣%   ・親要素のcontents幅(paddingやborderを除いた幅)        に対して%   ・paddingやborder が外に付く 初学者のときにその違いスルーされがち🤔 #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
width: autoと%🎶
1️⃣auto
  ・初期値
  ・paddingやborder を足すと、その分の幅が増える
2️⃣%
  ・親要素のcontents幅(paddingやborderを除いた幅)    
   に対して%
  ・paddingやborder が外に付く

初学者のときにその違いスルーされがち🤔

#Codejump #CSS中級

CSS小技✨ place-items vs place-content決定的な違い🎶 子要素が1つだけなら結果は同じ...でも複数だと ✅ place-items は「親がちゃんと整ってれば」使える ❌ place-content は「子要素のsizeが相対値だと」 おかしなことになる🤔 #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
place-items vs place-content決定的な違い🎶
子要素が1つだけなら結果は同じ...でも複数だと
✅ place-items は「親がちゃんと整ってれば」使える
❌ place-content は「子要素のsizeが相対値だと」
       おかしなことになる🤔
#Codejump #CSS中級 #Web制作

CSS小技✨ 自分ずっとやってたけど非推奨だった話🎶 background: url(img) no-repeat center/cover; って書いてたけど、実は順番NGだった…! 正しくは background: center/cover url(img) no-repeat; 詳しくはCurbonで👇 #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
自分ずっとやってたけど非推奨だった話🎶
 background: url(img) no-repeat center/cover;
って書いてたけど、実は順番NGだった…!
正しくは
 background: center/cover url(img) no-repeat;
詳しくはCurbonで👇

#Codejump #CSS中級 #Web制作

CSS小技✨ Q & Aで1行目と2行目の余白🎶 p::first-letter { font-size: 2rem ↑ 文字の行の高さが他の行よりも大きくなり、 行間が広がってしまう🤔 p::first-line { line-height: 1👍 ↓ 1行目の行の高さを文字Sizeに関わらず、 行間の広がりを抑えることができる💻 #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
Q &amp;amp; Aで1行目と2行目の余白🎶
p::first-letter {
  font-size: 2rem
↑
文字の行の高さが他の行よりも大きくなり、
行間が広がってしまう🤔
p::first-line {
  line-height: 1👍
↓
1行目の行の高さを文字Sizeに関わらず、
行間の広がりを抑えることができる💻
#Codejump #CSS中級

CSS小技✨ 次の要素を指定「+」🎶 <ul> <li></li> <li></li> <li></li> </ul> 1️⃣2番目指定:li:nth-child(1) + li { color: red; } 2️⃣3番目指定:li:nth-child(1) + li + li { color: blue; } または、li:nth-child(1) ~ li:nth-child(3) 直接:nth-child(1)以外は効かない #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
次の要素を指定「+」🎶
&amp;lt;ul&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
1️⃣2番目指定:li:nth-child(1) + li { color: red; }
2️⃣3番目指定:li:nth-child(1) + li + li { color: blue; }
または、li:nth-child(1) ~ li:nth-child(3)
直接:nth-child(1)以外は効かない

#Codejump #CSS中級

CSS小技✨ 画像にGradient Overlayを追加する方法🎶 1️⃣::beforeを使う → 冗長になりやすい 2️⃣border-image + fillを使う → ややトリッキー 3️⃣Gradientと画像をbackgroundでLayer → 短くて明快 #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
画像にGradient Overlayを追加する方法🎶
1️⃣::beforeを使う → 冗長になりやすい
2️⃣border-image + fillを使う → ややトリッキー
3️⃣Gradientと画像をbackgroundでLayer → 短くて明快

#Codejump #CSS中級

CSS小技✨ place-itemsとplace-content中央寄せの重要な違い🎶 1️⃣place-content   Grid Track全体(行と列の集まり)を、   grid container内で中央に寄せる    2️⃣place-items   各grid-itemの中身を、それぞれのgrid-cell内で   中央に寄せる #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
place-itemsとplace-content中央寄せの重要な違い🎶
1️⃣place-content
  Grid Track全体(行と列の集まり)を、
  grid container内で中央に寄せる
  
2️⃣place-items
  各grid-itemの中身を、それぞれのgrid-cell内で
  中央に寄せる

#Codejump #CSS中級

CSS小技✨ attr新機能🎶 cellの幅ごとに CSS を追加するのは不便 attrで cell幅を省エネ指定👍 <div class="cell" data-column="2">2</div> <div class="cell" data-column="3">3</div>... .cell { grid-column: span attr(data-column type(<integer>), 1); #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
attr新機能🎶
cellの幅ごとに CSS を追加するのは不便
attrで cell幅を省エネ指定👍
&amp;lt;div class=&quot;cell&quot; data-column=&quot;2&quot;&amp;gt;2&amp;lt;/div&amp;gt;
&amp;lt;div class=&quot;cell&quot; data-column=&quot;3&quot;&amp;gt;3&amp;lt;/div&amp;gt;...
.cell {
  grid-column: span attr(data-column type(&amp;lt;integer&amp;gt;), 1);

#Codejump #CSS中級

CSS小技✨ 上下左右中央🎶 1️⃣Left .parent { display: grid place-items: center 2️⃣right .parent { align-content: center .child { max-inline-size: max-content   ↓ 要素のinline方向(通常は水平方向)の最大sizeを定義 margin-inline: auto #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
上下左右中央🎶
1️⃣Left
  .parent {
    display: grid
    place-items: center
2️⃣right
  .parent {
    align-content: center
  .child {
    max-inline-size: max-content
  ↓
    要素のinline方向(通常は水平方向)の最大sizeを定義
    margin-inline: auto
#Codejump #CSS中級

CSS小技✨ 詳細度🎶 ㊧ .box :is(.title, p) { color: red; .box p { color: blue; ㊨ .box :where(.title, p) { color: red; .box p { color: blue; #Codejump #CSS中級 #Web制作

Robby_WebDesign's tweet image. CSS小技✨
詳細度🎶
㊧ .box :is(.title, p) {
       color: red;
     .box p {
       color: blue;
㊨ .box :where(.title, p) {
       color: red;
    .box p {
       color: blue;
#Codejump #CSS中級 #Web制作

CSS小技✨ なぜ流動系が流行ってる? 1️⃣media query地獄からの解放   Breakpointsを何度も書かずに済む 2️⃣Minimal and scalable   Utility・token化に相性抜群 3️⃣Designが自然に馴染む Smartphone・Tablet・Desktopで違和感なく展開 ✨rootにclamp() や min() / max() #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
なぜ流動系が流行ってる?
1️⃣media query地獄からの解放
  Breakpointsを何度も書かずに済む
2️⃣Minimal and scalable
  Utility・token化に相性抜群
3️⃣Designが自然に馴染む
       Smartphone・Tablet・Desktopで違和感なく展開
✨rootにclamp() や min() / max()
#Codejump #CSS中級

CSS小技✨ inline変数指定🎶 <div class="box"> <div style="--ratio: 4/3" class="item">4:3</div> <div style="--ratio: 2/3" class="item">2:3</div>.. .box { display: flex .item { flex-basis: 0 aspect-ratio: var(--ratio) flex-grow: calc(var(--ratio)) #Codejump #CSS中級

Robby_WebDesign's tweet image. CSS小技✨
inline変数指定🎶
&amp;lt;div class=&quot;box&quot;&amp;gt;
 &amp;lt;div  class=&quot;item&quot;&amp;gt;4:3&amp;lt;/div&amp;gt;
 &amp;lt;div  class=&quot;item&quot;&amp;gt;2:3&amp;lt;/div&amp;gt;..
.box {
 display: flex
 
.item {
 flex-basis: 0
 aspect-ratio: var(--ratio)
 flex-grow: calc(var(--ratio))

#Codejump #CSS中級

Loading...

Something went wrong.


Something went wrong.


United States Trends