Friends who are studying the standard will generally come into contact with the CSS sliding door technology during the learning process. Maybe everyone has read this article, "sliding door technology in CSS". if you have not touched or have not read the above or forgotten content, you can click the link of the above article to learn about or review it.
In the example of a sliding door in CSS, you may have carefully tested and discovered that there are nine pixel blind spots in the connection area that cannot be clicked, and in IE, only the text part size can be clicked, and the entire button block cannot be clicked. However, we may expect that the entire button block can be clicked, and blind spots are not allowed.
So how can we implement it? Next we will discuss some solutions:
First, for convenience, we should first move the code in CSS sliding door technology:
XHTML section:
<Div id = "header">
<Ul>
<Li> <a href = "#"> Home </a> </li>
<Li id = "current"> <a href = "#"> News </a> </li>
<Li> <a href = "#"> Products </a> </li>
<Li> <a href = "#"> About </a> </li>
<Li> <a href = "#"> Contact </a> </li>
</Ul>
</Div>
CSS section:
# Header {
Float: left;
Width: 100%;
Background: # DAE0D2 url ("bg.gif") repeat-x bottom;
Font-size: 93%;
Line-height: normal;
}
# Header ul {
Margin: 0;
Padding: 10px 10px 0;
List-style: none;
}
# Header li {
Float: left;
Background: url ("left.gif") no-repeat left top;
Margin: 0;
Padding: 0 0 0 9px;
}
# Header {
Float: left;
Display: block;
Background: url ("right.gif") no-repeat right top;
Padding: 5px 15px 4px 6px;
Text-decoration: none;
Font-weight: bold;
Color: #765;
}
/* Commented Backslash Hack
Hides rule from IE5-Mac */
# Header a {float: none ;}
/* End IE5-Mac hack */
1st 2 3 4 5 6 7 8 pages