まずはCANVAS タグで描画するスペースのサイズを決める【1-1】。そのスペースにグラフを描画するための筆にあたるのがJavaScriptだ。getElementByIdメソッドを使いCANVASのidを取得、getContextメソッドで描画用のコンテキストを取得する。取得したコンテキストはctxというオブジェクトに格納(オブジェクト名は何でもかまわない)。このctxオブジェクトにグラフを描画していくことになる【1-2】。 【1-1】CANVASタグには、幅(width属性)と高さ(height属性)、範囲(描画領域)を指定する。またJavaScriptで使用するid属性も設定する。タグの間には非対応ブラウザ用の注意書きを入れておこう 【1-2】CANVASタグのidをgetElementByIdの引数に指定する。なお、getContext()の引数は現在では「2D」しか選択できないよ
IEの各バージョンごとに異なるスタイルシートを適用する方法はいくつかあります。それらの利点・欠点を検討し、さらにIE9へどのように対応したらよいのかを紹介します。 In defense of CSS hacks — introducing "safe CSS hacks" [ad#ad-2] 下記は各ポイントを意訳したものです。 Conditional stylesheets -条件付きコメント:スタイルシート Conditional classnames -条件付きコメント:class名 CSS hack -安全なCSS hackとは 条件付きコメント:class名とCSS hackのコンビネーション [ad#ad-2] Conditional stylesheets -条件付きコメント:スタイルシート 条件付コメントはInternet Explorerの特定のバージョンでロードさせるべ
HTML5 and CSS3 are great languages to start off learning with, and I've always thought that one of the best ways to start learning is to just dive in and manipulate the code. As you could probably tell, this is where generators step in. They are a great way to generate some code, play with it, and learn. Not only that, they are incredibly useful because often times as a developer or designer we fi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く