Base-Interlaced color

Source: Internet
Author: User

Structure

<Divclass="Box">
<Ul>
<Li>
<Span>Primary school</Span><Span>3Grade</Span><Span>5Class</Span><Span>Zhou Jie stick</Span>
</Li>
<Li>
<Span>High school</Span><Span>2Grade</Span><Span>3Class</Span><Span>Double-cut LUN</Span>
</Li>
<Li>
<Span>Primary school</Span><Span>3Grade</Span><Span>5Class</Span><Span>Zhou Jie stick</Span>
</Li>
<Li>
<Span>High school</Span><Span>2Grade</Span><Span>3Class</Span><span > double section Lun Span style= "color: #c9a765; Font-weight:bold; " ></span
</ li>
Span style= "color: #c9a765; Font-weight:bold; " > </ul>
</div >

Style

.Box{
Width230px
}
UL {
List-style-type:none;
}
.box line-height: 30PX;
padding-left: 10PX;
}
.box margin-right: 5PX;

/span>
.  li.{
!important;
}

Behavior

Window.onload =function() {
VarAbox =Document.Getelementsbyclassname("Box");
VarALi =Abox[0].getElementsByTagName("Li");
For(VarI=0,L=ALi.Lengthi<Li++) {
If(i%2) {
ALi[I].Style.BackgroundColor ="#DDDDDD";
}Else{
ALi[I].Style.BackgroundColor ="#cbc06c";
}
      ALi[I].onmouseover =function() {
this. classname = " Special ";
}
Ali[< Span style= "color: #8db4f2;" >ionmouseout= function () {
this. classname = "";
} /span>      
}
}

Base-Interlaced color

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.