JavaScript + Ajax 実践サンプル集 (1276本以上) ◇編集して実行可能◇
jQueryを使い倒せ! jQueryでAjaxを実装するための基礎知識と実践サンプルを一挙公開中... powered by asp.net 3.5
ホーム
jQuery
jQuery プラグイン
jQuery UI
人気順
カテゴリ
キーワード
クール
新着
ツリー
jQuery PDF
ホット
サイト情報
サイトマップ
★ 新着サンプルトップ50のRSSを購読する
◆ DHTMLサンプル(基礎)のRSSを購読する
◆ DHTMLサンプル(応用)のRSSを購読する
◆ AJAXサンプルのRSSを購読する
◆ その他サンプルのRSSを購読する
◆ BOM(Browser Object Model)のRSSを購読する
◆ DOM(Document Object Model)のRSSを購読する
棒グラフ用CSS
説明
補足説明
コード
分割コード
関連書籍
コメント投稿
このサンプルは、イメージとスタイルシートを使用して棒グラフを表示します。Basic Bar Graphは、CSSのみ使用して棒グラフを表示しています。Complex Bar Graphは、CSSとイメージを使用して複雑な棒グラフを表示しています。Vertical Bar Graphは、イメージ上に棒グラフを表示しています。
このサンプルを編集して試してみる
このサンプルで使用しているイメージです。イメージを右クリックしてダウンロードしてください。
CSS for bar graphs
Basic Bar Graph
54%
8%
Complex Bar Graph
Love Life
25%
Education
55%
War Craft 3 Rank
75%
Vertical Bar Graph
22
7
3
8
2
CSS部
HEAD部
BODY部
ボックス内のスタイルシート(CSS)を外部ファイル(*.css)、またはHTMLドキュメントの<HEAD>セクションの<style>タグ内にコピー&ペーストしてください。
StyleSheet.css /* General */ .clear { clear: both; } /* Basic Bar Graph */ .graph { position: relative; /* IE is dumb */ width: 200px; border: 1px solid #B1D632; padding: 2px; margin-bottom: .5em; } .graph .bar { display: block; position: relative; background: #B1D632; text-align: center; color: #333; height: 2em; line-height: 2em; } .graph .bar span { position: absolute; left: 1em; } /* This extra markup is necessary because IE doesn't want to follow the rules for overflow: visible */ /* Complex Bar Graph */ dl { margin: 0; padding: 0; } dt { position: relative; /* IE is dumb */ clear: both; display: block; float: left; width: 104px; height: 20px; line-height: 20px; margin-right: 17px; font-size: .75em; text-align: right; } dd { position: relative; /* IE is dumb */ display: block; float: left; width: 197px; height: 20px; margin: 0 0 15px; background: url( "g_colorbar.jpg" ); } * html dd { float: none; } /* IE is dumb; Quick IE hack, apply favorite filter methods for wider browser compatibility */ dd div { position: relative; background: url( "g_colorbar2.jpg" ); height: 20px; width: 75%; text-align: right; } dd div strong { position: absolute; right: -5px; top: -2px; display: block; background: url( "g_marker.gif" ); height: 24px; width: 9px; text-align: left; text-indent: -9999px; overflow: hidden; } /* Vertical Bar Graph */ #vertgraph { width: 378px; height: 207px; position: relative; background: url( "g_backbar.gif" ) no-repeat; } #vertgraph ul { width: 378px; height: 207px; margin: 0; padding: 0; } #vertgraph ul li { position: absolute; width: 28px; height: 160px; bottom: 34px; padding: 0 !important; margin: 0 !important; background: url( "g_colorbar3.jpg" ) no-repeat !important; text-align: center; font-weight: bold; color: white; line-height: 2.5em; } #vertgraph li.critical { left: 24px; background-position: 0px bottom !important; } #vertgraph li.high { left: 101px; background-position: -28px bottom !important; } #vertgraph li.medium { left: 176px; background-position: -56px bottom !important; } #vertgraph li.low { left: 251px; background-position: -84px bottom !important; } #vertgraph li.info { left: 327px; background-position: -112px bottom !important; } /* Note: The use of !important is to over write my site stlyesheets for these examples */
ボックス内のコードをHTMLドキュメントの<HEAD>セクションにコピー&ペーストしてください。
ボックス内のコードをHTMLドキュメントの<BODY>セクションにコピー&ペーストしてください。
Basic Bar Graph
54%
8%
Complex Bar Graph
Love Life
25%
Education
55%
War Craft 3 Rank
75%
Vertical Bar Graph
22
7
3
8
2
コメント・提案の投稿!
名前
メール
件名
本文
送信中です...
ASP.NET 3.5
|
Akio's Blog