| HTMLヘッダの記述 |
|---|
<!--[if lt IE 8]> <script type="text/javascript src="IE8.js""></script> <![endif]--> |
| IE8 | IE7 | IE7+ IE8.js |
IE6 | IE6+ IE8.js |
Firefox 3 |
Safari 4 |
Chrome 3 |
Opera 10 |
Sleipnir 2 |
|---|---|---|---|---|---|---|---|---|---|
| ○ | ○ | ○ | × | ○ | ○ | ○ | ○ | ○ | ○ |
>)で区切ることにより、selector1の直属の子になるselector2に対して設定することができます。| HTMLのサンプル | |||
|---|---|---|---|
|
| HTMLの記述 |
|---|
<table class="tree1"><tr><td>style1 <table class="tree2"><tr><td>style2 <table class="tree3"><tr><td>style3 </td></tr></table> </td></tr></table> </td></tr></table> |
| スタイルシートの記述 |
|---|
table.tree1, table.tree2, table.tree3 {
border-collapse: collapse;
margin: 3px;
}
table.tree1>tbody>tr>td {
border: #770000 2px solid;
color: #770000;
background: #ffeeee;
}
table.tree2>tbody>tr>td {
border: #007700 2px solid;
color: #007700;
background: #eeffee;
}
table.tree3>tbody>tr>td {
border: #000077 2px solid;
color: #000077;
width: 200px;
background: #eeeeff;
}
|
| IE8 | IE7 | IE7+ IE8.js |
IE6 | IE6+ IE8.js |
Firefox 3 |
Safari 4 |
Chrome 3 |
Opera 10 |
Sleipnir 2 |
|---|---|---|---|---|---|---|---|---|---|
| ○ | ○ | ○ | × | ○ | ○ | ○ | ○ | ○ | ○ |
| HTMLのサンプル | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
| HTMLの記述 |
|---|
<table class="sep1"> <tr><th>見出し1</th><th>見出し2</th><th>見出し3</th></tr> <tr><td>データ1</td><td>データ2</td><td>データ3</td></tr> <tr><td>データ1</td><td>データ2</td><td>データ3</td></tr> </table> |
| スタイルシートの記述 |
|---|
table.sep1 {
border-collapse: collapse;
width: 250px;
text-align: center;
margin: 5px;
padding: 5px;
}
table.sep1>tbody>tr>th, table.sep1>tbody>tr>td {
border-left: #000077 2px solid;
}
table.sep1>tbody>tr>th:first-child, table.sep1>tbody>tr>td:first-child {
border-left: none;
}
|
| IE8 | IE7 | IE7+ IE8.js |
IE6 | IE6+ IE8.js |
Firefox 3 |
Safari 4 |
Chrome 3 |
Opera 10 |
Sleipnir 2 |
|---|---|---|---|---|---|---|---|---|---|
| ○ | × | ○ | × | ○ | ○ | ○ | ○ | ○ | ○ |
| HTMLのサンプル |
|---|
大見出し小見出し |
| HTMLの記述 |
|---|
<div class="bdr1"> <h2 class="lbl1">大見出し</h2> <h3 class="lbl1">小見出し</h3> </div> |
| スタイルシートの記述 |
|---|
@charset "utf-8";
div.bdr1 {
position: relative;
background: #ffffff url('img/bdr1_body.jpg');
width: 550px;
margin: 5px;
padding: 25px;
}
div.bdr1:before {
position: absolute;
left: 0px;
top: 0px;
content: url('img/bdr1_head.jpg');
width: 600px;
height: 25px;
}
div.bdr1:after {
position: absolute;
left: 0px;
bottom: 0px;
content: url('img/bdr1_foot.jpg');
width: 600px;
height: 25px;
}
h2.lbl1:before {
content: '<';
}
h2.lbl1:after {
content: '>';
}
h3.lbl1:before {
content: '●';
}
|
| IE6用スタイルシートの追加記述 |
|---|
* html div.bdr1 {
overflow: hidden;
}
|
| IE8 | IE7 | IE7+ IE8.js |
IE6 | IE6+ IE8.js |
Firefox 3 |
Safari 4 |
Chrome 3 |
Opera 10 |
Sleipnir 2 |
|---|---|---|---|---|---|---|---|---|---|
| ○ | ○ | ○ | × | ○ | ○ | ○ | ○ | ○ | ○ |
| HTMLのサンプル |
|---|
|
マウスカーソルを合わせると、背景色が変わります。
|
| HTMLの記述 |
|---|
<div class="over1"> マウスカーソルを合わせると、背景色が変わります。 </div> |
| スタイルシートの記述 |
|---|
div.over1:hover {
color: #007700;
background: #eeffee;
}
|