OKANOWEB WEB PARTS SAMPLE

Rollover Effects


狂歌 /BLOG /LINK /Conputer / TAG /

この例では、7つの幅要素を持ちます、最初セットします。マウスが要素の一つの上に進むとき、それがクラス・ハイライトを使うようにされて。Internet Explorer 4.xの中の機能が可能にします:


<style>
.Item {
cursor: hand;
font-family: MS ゴシック;
font-size: 14;
font-style: normal;
background-color: green;
color: white
}
.Highlight {
cursor: hand;
font-family: MS ゴシック;
font-size: 14;
background-color: white;
color: blue
}
A { text-decoration: none; }
</style>
 <script>
function rollon() {
if (window.event.srcElement.className == "Item") {
window.event.srcElement.className = "Highlight";
}
}
Rollover.onmouseover = rollon;
function rolloff() {
if (window.event.srcElement.className == "Highlight") {
window.event.srcElement.className = "Item";
}
}
Rollover.onmouseout = rolloff;
</script>
 <div id="Rollover">
 <a href="../../kyouka/index.html"><span class="Item"> 狂歌 /</span></a>
<a href="../../info/index.htm"><span class="Item"> 主張 /</span></a>
<a href="../../mopalink/index.htm"><span class="Item"> LINK /</span></a>
<a href="../../index.htm"><span class="Item"> Conputer /</span></a>
<a href="../../index.htm"><span class="Item"> TAG /</span></a>
<a href="http://homepage1.nifty.com/mopa/"><span class="Item"> MOPA-2 </span></a>
</div>