An example of imitating the title attribute of a implemented by jQuery. During the test, the levels of ie6 and 7 were disordered, but the final solution was solved. The html code is as follows: & lt; divclass & quot; wrap & quot; & gt; & lt; ulclass & quot; listclearfix & quot; & gt; & lt; li & gt; & lt; ahref & quot; & q
An example of imitating the title attribute of a implemented by jQuery. During the test, the levels of ie6 and 7 were disordered, but the final solution was solved.
The html code is as follows:
- UI Designer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- Front-end development engineer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- O & M Engineer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- R & D engineers
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- UI Designer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- Front-end development engineer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- O & M Engineer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- R & D engineers
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- UI Designer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- Front-end development engineer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- O & M Engineer
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
- R & D engineers
Department: Technical Department
Work Location: Zhengzhou
Recruitment: 21
The css code is as follows:
*{
Margin: 0;
Padding: 0;
}
Body {
Font-size: 12px;
}
. Wrap {
Width: 600px;
Margin: 100px auto;
}
. Clearfix: after,. clearfix: before {
Display: table;
Content :"";
}
. Clearfix: after {
Clear: both;
Overflow: hidden;
}
. Clearfix {
Zoom: 1;
}
. List {
Position: relative; // as the parent element for positioning, li directly duplicates the content of the parent element.
}
. List li {
List-style: none;
Width: 100px;
Height: 24px;
Line-height: 24px;
Margin-right: 10px;
Float: left;
}
. List li {
Text-decoration: none;
Color: #333;
Display: block;
}
. Show {
Position: absolute;
Width: 100px;
Background: # FFFFE1;
Border: 1px solid # ffcc01;
Padding: 6px;
Display: none;
Z-index: 5;
Margin-top: 10px; // replace top
Margin-left: 60px; // replace left
}
. Show p {
Height: 18px;
Line-height: 18px;
}
. List li a: hover {
Text-decoration: underline;
Color: # FF0000;
}
The jQuery code is as follows: