Post on:2018年12月13日
sponsorsr
2018年も、CSSの進化がすごかったです!
CSSを使ったアニメーションはより快適なものが増え、JavaScriptを使用しないと実装できなかったものがCSSだけで実装できるようになったり、vwやvhやcalc()などを効果的に使用したり、レイアウト、ナビゲーション、カードなどもより洗練されて実装されています。
さまざまな素晴らしいアイデアが取り入れられたスタイルシートを使ったテクニックを紹介します。
各デモはCSSのみで実装されたものもありますが、JavaScript併用もあります。
動作を見るには、「Run Pen」をクリックするか、クリック後に右上「Edit on Codepen」をクリックしてください。
まずは、ダイナミックなアニメーションが楽しいソーラーシステム。動きが斬新で、スライドなどに応用してもよさそうです。ベストビューは、Operaです。
See the PenSolar System Explorer in CSS only by Jamie Coulter (@jcoulterdesign) onCodePen.
clip-pathプロパティを使用して、斜めにデザインされたヘッダ。
See the PenHeader for landing page using clip path. by Gerardo Valencia (@grardovr) onCodePen.
スクロールすると背景のグラデーションが変化します。
See the PenPure CSS3 Gradient Background Animation by Manuel Pinto (@P1N2O) onCodePen.
右上のボタンをクリックすると、レイアウトが変化します。
See the PenType Festival - GSAP transitions by Karlo Videk (@karlovidek) onCodePen.
スクロールすると中央の要素が爆発するエフェクト。
See the PenHeadline explosion by Tobias Reich (@electerious) onCodePen.
スクロールするとヘッダ画像がズームします。ここ1,2年でこのエフェクトをたくさん見かけました。
See the PenZoom Hero Image On Scroll by Jason D'Oyley (@jdfd) onCodePen.
CSSのみで実装されたマスクのエフェクト。ベストビューはIEです。
See the PenThe Future Of Possible - DJI by Helkyle (@HelKyle) onCodePen.
キラキラしたが楽しいテキストのアニメーション。はじけ散る感じがきれいです。
See the Penglow sparks text by Julius Horn (@Supercopra) onCodePen.
ラジオボタンを使用したタブ型コンテンツのナビゲーション。
See the PenScooped Selector | CSS-only cut-out tab navigation | @keyframers 1.16.0 by @keyframers (@keyframers) onCodePen.
磁石のように近づいてくるマグネットリンクのエフェクト。個人的にはこれが今年一番印象的でした。
See the PenMagnetic link UI effect by Ryan Yu (@iamryanyu) onCodePen.
よく見かける水平型のナビゲーション。Home, Aboutも気持ちいいアニメーションですが、その先がもっと気持ちいいです。
See the PenCodePen Challenge: Menu by Adam Kuhn (@cobra_winfrey) onCodePen.
ページ内の見出しをサイドバーに掲載し、追従させるナビゲーション。
See the PenSticky, Smooth, Active Nav by Chris Coyier (@chriscoyier) onCodePen.
アクティブのタブにハイライトがアニメーションで移動します。
See the PenFluid tab active state by Aaron Iker (@aaroniker) onCodePen.
サイドメニューが表示されるハンバーガーメニュー。表示する際の動きが快適です。
See the PenSide Menu Animation by Jordan (@flyingcar) onCodePen.
カードが3Dにフリップします。ボタンがあるおかげで、さらに立体的に見えています。
こちらもフリップ。動きを一つ加えるだけで、操作の気持ちよさも変わります。
See the PenPure CSS Flip Card by Aron (@Aoyue) onCodePen.
カードを使った新しいスライダー。
See the PenResponsive News Card Slider by Muhammed Erdem (@JavaScriptJunkie) onCodePen.
ふわふわ浮いている感が操作を楽しくします。
See the PenTricky CSS hover by Piotr Galor (@pgalor) onCodePen.
ソーシャルメディアのボタン。タイルがふわりと浮かぶのは他にも応用できそうです。
See the Pen3D - CSS Social Tiles by Stockin (@Stockin) onCodePen.
Flexboxで実装された、カードを使ったアコーディオン。
See the PenExpanding flex cards by Zed Dash (@z-) onCodePen.
これも一種のアコーディオンでしょうか。伸縮もいろいろな可能性がありますね。
See the Pen☑️ Transform Toggles, will-change ☑️ by Shaw (@shshaw) onCodePen.
2.5DのエフェクトをCSSで実装。
See the Pen2.5D by Matt Drew (@highplainsdrifter) onCodePen.
この動きは想定外でした。
See the PenTariff Cards by Andreas Storm (@andreasstorm) onCodePen.
この動きも想定外です! 折りたたみ式のモーダルウインドウ。
See the PenFolding Modal by Blake Bowen (@osublake) onCodePen.
CSS Gridを使用したアイソメトリックのレイアウト。来年あたりから増えてくるのでしょうか。
See the PenIsometric eCommerce CSS Grid by Andy Barefoot (@andybarefoot) onCodePen.
CSS Gridを使用すると、今までにはなかったレイアウトも登場しそうです。
See the PenStan Lee - In Memoriam (CSS Grid) by Brad Bales (@brad4au57) onCodePen.
中央のGridアイテムのサイズを変更すると、すべてが同じにコピーされます。
See the PenUsing grids to create copies by Roman Komarov (@kizu) onCodePen.
CSS Gridで実装されたマークシートの回答用紙。マークもできます。
See the PenScantron Answer Sheet (CSS grid demo) by Jon Kantner (@jkantner) onCodePen.
CSSだけで比率をスケーリングしたレイアウト。
See the PenCSS-only Responsive Image Grid (with ratio scaling) by Raymon Schouwenaar (@rsschouwenaar) onCodePen.
フォームの入力時に、ラベルをぽんっと弾くように動かします。
See the PenElastic Input [Google Chrome] by Andreas Storm (@andreasstorm) onCodePen.
フォームの入力値をチェックする際に、ちょっとしたアニメーションを加えます。
See the PenElastic Validation [Google Chrome] by Andreas Storm (@andreasstorm) onCodePen.
フォームの入力時に、枠線をハイライトさせます。From middle, Circleとかいいですね。
See the PenAnimation Border by Itzik Pop (@chaofix) onCodePen.
ログインだけのページなら、こんなレイアウトも有りですね。
See the PenLogin Form by Tony Banik (@banik) onCodePen.
ラジオボタンをチェックする際に、ぷるるんと動かします。
See the PenWobble radiobuttons by Tamino Martinius (@Zaku) onCodePen.
CSSのみで実装されたアクセシブルなラベルを浮かせるテクニック。
See the PenCSS-Only Accessible Floating Labels by Pablo Eugenio Lujambio Martinez (@elujambio) onCodePen.
スクロールに連動して、背景のグラデーションを変化させます。
See the PenScrolling Gradient by Mike (@MadeByMike) onCodePen.
スクロールに連動して、全体をプログレスバーで囲みます。
See the PenWraparound Progress Bar by Thomas Vaeth (@thomasvaeth) onCodePen.
水平スクロールの気持ちいいエフェクト。全体表示で見るのがオススメです。
See the PenHorizontal scroll, drag, transition, bounce by jesper landberg (@ReGGae) onCodePen.
CSSのみで実装されたパララックス。
See the PenCSS-Only Parallax Effect by Yago Estévez (@yagoestevez) onCodePen.
こういうは思わず、見入ってしまいます。
See the PenThe goddess is coming by Comehope (@comehope) onCodePen.
手前から奥に回転する動きは、珍しいですね。
See the PenHelix CSS Loader by Jerry Low (@jerrylow) onCodePen.
パックマンにインスパイアされたページネーション。離れている方がいい動きです。
See the PenPacman pagination by Mikael Ainalem (@ainalem) onCodePen.
ぱたっと開くソーシャルメディアのシェアボタン。
See the PenShare button by Veronica (@veronicadev) onCodePen.
スライド型のソーシャルメディアのシェアボタン。
See the Pen Social share button by Yancy Min (@yancy) onCodePen.
パースペクティブを使った面白いボタン。
See the PenPerspective button hover effect by Comehope (@comehope) onCodePen.
ゴミ箱のかわいいモーションを与えたアニメーション。
See the PenDelete Button With Micro-Interactions by Himalaya Singh (@himalayasingh) onCodePen.
脈打つような動きのボタン。この動きよく見かけます。
See the PenCSS Pulsing Button by Sasha (@sashatran) onCodePen.
CSSのみで実装された波紋のライプルエフェクト。
See the PenVersatile CSS-Only Ripple Effect by Jessie Proffitt (@jproffitt71) onCodePen.
消え去る際にさまざまなアニメーションを適用したボタン。
See the PenButtons falling apart by Mikael Ainalem (@ainalem) onCodePen.
付箋のように少しだけ浮かんで見えます。
See the PenLifted Paper Strips (Hover Effect) by Bastian Andre (@BastianAndre) onCodePen.
リンクの下線がうねうねアニメーションします。
See the PenLink Effectz - Squiggle by Geoff Graham (@geoffgraham) onCodePen.
del要素とins要素の手書き風にデザインされたエフェクト。
See the PenA Badly Written Answer - <del&rt; & by Leena Lavanya (@leenalavanya) onCodePen.
このエフェクトは一時期、流行りましたね。
See the Pen#CodePenChallenge - del & ins - demotivational quotes by Halida Astatin (@halidaa) onCodePen.
複数行を看板のように重ねたエフェクト。
See the PenMultiline padded text: experiments by Tim (@tfoh) onCodePen.
UX用のアニメーションがまとめられています。
See the PenUX in Motion | Animation by Praveen Bisht (@prvnbist) onCodePen.
tableタグを使ったコードチャレンジで、まさかこうくるとは!
See the PenPure CSS <table&rt; flip toggle! 😉🎉 #CodePenChallenge by Jhey (@jh3y) onCodePen.
線が形状を変えて、モナリザを形成します。
See the PenLine Lisa (based on low-sugar-eye-candy gif) by Nikita Dubko (@dark_mefody) onCodePen.
CSSで実装されたロウソク。
See the PenCSS Candle Flame Animation by Mamun Khandaker (@kh-mamun) onCodePen.
楽しげにダンスするアニメーション。最初見た時、ずっと見てしまいました。
See the PenPure CSS The Carlton dance by Grzegorz Witczak (@Wujek_Greg) onCodePen.
sponsors