IE6で透過PNGを表示する さて、ここからが今回の本題です。サンプル01をIE6でも正しく表示できるようにします。IE6ではCSSの独自拡張(filterプロパティ)を使って透過PNG画像を背景として表示できます(関連記事)。jQueryのスクリプトを書く前に、IE6で単純に透過PNGを表示するHTMLとCSSを作成します。 ナビゲーションメニューのHTMLはサンプル01と同様にul/li要素で記述します。IE6では透過PNGをimg要素に直接指定しても表示できませんので、代わりにダミー画像(1px×1pxの透過GIF画像=「transparent.gif」)を用意してsrc属性に指定します。img要素にはCSSを設定するため、「jquery」「javascript」などのメニューの項目名に対応したclass属性を付けておきます。 ▼サンプル02(HTML部分) <ul> <li><a
[はじめてのjQuery]jQueryを使うための準備(ダウンロードからHTMLへの組み込みまで) この記事を読むのに必要な時間の目安: 4分ぐらい 最近圧倒的な人気ぶりを感じるjQuery。比較的簡単に習得できそうだし、軽量なJavaScriptライブラリーでWEBページでの読み込みも速そうなうえにいろんな動きを実現できるということで、かなり出遅れた感はありますが、ついに私もjQueryをはじめようと思います。現時点でjQueryに関する知識は皆無ですが、独学でがんばります。 まずは、jQueryを使うための準備ですね。必要なライブラリは商用・非商用を問わず、無償で手に入れることができます。 ただし、ライブラリー中の著作権表示は消してはいけません。 jQuery公式サイト - http://jquery.com/ 公式サイトのダウンロードボタンをクリックするか、メニュー画面上部に表示
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く