Source <h1 class="ml1"> <span class="text-wrapper"> <span class="line line1"></span> <span class="letters">THURSDAY</span> <span class="line line2"></span> </span> </h1>
スクロールした際にヘルプや広告を表示したり、無限スクロールでコンテンツを読み込ませたり、画像の遅延ロードなど、要素がビューポートに表示されているかをトリガーにするのには、なかなか面倒なJavaScriptが必要でした。 例えば、スクロールやサイズ変更のイベントを取得し、getBoundingClientRect()などのDOM APIでビューポートからの相対位置を手動で計算します。 この今までの方法は面倒で非効率的でしたが、主要なブラウザに実装されているIntersectionObserver APIを使用すると、非常に簡単に取得することができます。 Intersection Observer comes to Firefox 下記は各ポイントを意訳したものです。 ※当ブログでの翻訳記事は、著者様にライセンスを得て翻訳しています。 「IntersectionObserver()」の基本的な
はじめに ネットには様々な情報が溢れており、JavaScriptに関する情報も多数存在しております。 その中には、「今時こんな書き方しねえよ…」と思わずツッコミを入れたくなるような、本当に、本当に古い内容について書かれている古文書も存在します。 そんな罠記事の情報に囚われてしまって、いつまで経っても現代的なJavaScriptが書けない皆さんのために、このシリーズの記事では、各セクション毎に分けて、旧石器時代の記述と、現代の記述を紹介する形で、文明開化をしていきたいという思いで記述する。 最初は、現在比較的メジャーなブラウザで一通り動作する「ECMAScript 5」までの内容に関してポエムを書き連ねていき、最終的には一連の内容を読むだけで「ES6(ES2015)」による新機能や、絶賛提案中の「ES7」の一部提案内容についても把握し、おおよそ現代人を育成することを目標とする。 …なんてめっ
deSVG Remove inline SVG bloat from your HTML document. Style SVGs with CSS. SVGs still accessible without JavaScript. What does it do? deSVG takes the <img /> tags you supply. It then grabs, using AJAX, the raw SVG you've set in the "src" attribute and replaces that <img /> with the <svg /> it downloads. Include the JavaScript file on your page <script src="path/to/desvg.js"></script> Kick off deS
JavaScriptを使ってアニメーションを書くときに有用なテクニックの、基本中の基本をご紹介します。おそらく、このブログを見ている人のほとんどにとっては釈迦に説法だと思います。今回、requestAnimationFrameの話すらしません。その点、ご留意ください。 まず、JavaScriptでアニメーションをする場合に気をつけないといけないのが、一度JavaScriptの実行(Context)を抜けないとブラウザに描画が反映されないということです。簡単に言うと、 <html><head><title>bad sample</title><script> onload = function() { var e = document.getElementById("e"); for(var i = 0; i <= 100; i += 5) { e.style.left = e.style.
Fantastic Micro-Frameworks and Micro-Libraries for Fun and Profit! How much library code do you really need — 50K? 100K? 150K? More? How much of that do you really use? Sure, we all love our favorite monolithic frameworks, and sometimes we even use them fully. But how often do we reach for the ride-on John Deere tractor with air conditioning and six-speaker sound system, when a judiciously applied
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="ja" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-eq
[JS]異なる高さのdiv要素を揃えるだけでなく、均等割付やグリッドに揃えることもできるスクリプト -jQuery.grrrid.js
Learn HTML5, CSS3, Javascript and more... Video style walkthroughs showing cool stuff being created from scratch
Turn.js is a JavaScript library that will make your content look like a real book or magazine using all the advantages of HTML5. The web is getting beautiful with new user interfaces based in HTML5; turn.js is the best fit for a magazine, book or catalog based in HTML5. <div id="flipbook"> <div class="hard"> Turn.js </div> <div class="hard"></div> <div> Page 1 </div> <div> Page 2 </div> <div> Page
このセッションでは、前半でNodeのコンセプトを、後半では来週にもリリース予定のNodeの新バージョンについて紹介します。 このデニス・リッチーの言葉はNodeの特徴を表していて、Nodeとは機能を加えるよりもむしろ取り去ったものです。 いまのOSのインターフェイスのほとんどは、1970年代のテレプリンタのような歴史をひきずっています。ケン・トンプソンとデニス・リッチーが開発したUNIXやCは当時のPDP11のためにデザインされたもので、いまのOSもその歴史上にあるのです。 UNIXの基本概念は、対話的なコマンドラインを作るものでした。lsコマンドを打つとその結果がテレタイプに出力されるといったものです。そして基本概念には、ブロックするシステムコールやプロセスが含まれています。 ブロックするシステムコールを呼び出すと、I/Oが完了するまで戻ってきません。戻ってくるまでどれだけかかるかも分か
Levi's Roadwear. Come on tour with Mermonkey. 6 states, 12 days, 2225 miles. The journey starts at Levis's Roadwear http://www.levisroadwear.com/my
こんにちは、太田です。3回ほどJavaScriptの基礎的な内容が続いたので、今回はグラフィカルなアニメーションについて解説します。グラフィカルなJavaScriptというと、難しい・応用的なイメージがあるかもしれませんが、JavaScriptでのアニメーションとはすなわちCSSを段階的に操作するということで、そのポイントを抑えれば中身は単純なものです。 アニメーションの前提知識 HTMLにおける通常のアニメーションを構成するのは、「特定の要素」に対して、「そのCSSプロパティ」を「ある時点からある時点まで」の時間の中で、「ある値からある値に操作」する、といった要素です。 特定の要素と、CSSプロパティについては問題ないと思います。問題となるのは「時間と値の操作」です。 まず、単純にインクリメントするだけというサンプルを見てみましょう。 良くないアニメーション var y = 0;
The Visual 6502 FAQ Blog Links This simulator uses HTML5 features only found on the latest versions of browsers and needs lots of RAM. If you have trouble, please check compatibility. Keyboard controls: 'z' to zoom in, 'x' to zoom out, 'n' to step the simulation. Mouse controls: Left-click and drag to scroll around (when you're zoomed in.) More information in the User Guide.
Chrome Experiments is a showcase of work by coders who are pushing the boundaries of web technology, creating beautiful, unique web experiences. You'll find helpful links throughout the site for creating your own experiments, and you can also explore resources like WebGL Globe and our workshop of tools.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く