HTML 下拉式菜单
AwqJerry:
首先感谢大佬,膜拜!
然后,我套到我的网页上去的时候,就出了点问题,有一个位移我没法削掉。大佬能帮忙看看吗?
[code=css].topclick {
height: 30px;
width: 60px;
position:relative;
display:inline-block;
}
.ltbox1 {
width: 60px;
height: 30px;
background-color: pink;
text-align: center;
font-size: large;
line-height: 30px;
cursor: pointer; /*鼠标指针经过*/
}
.ltbox2{
width: 30px;
height: 100px;
margin-top: 2px;
border-radius: 10px;
font-size:small;
background-color: white;
position:absolute;
display: none; /*使下拉菜单栏消失*/
}
.li1{
margin-top: 5px;
}
.ltbox2 li{
height: 30px;
width: 60px;
text-align: center;
line-height: 30px;
display: block; /*使下拉菜单栏显示*/
}
.ltbox2 li:hover{
background-color:#E8E8E8;
}
.topclick:hover .ltbox2{
display: block;
}
[/code]
HTML:
[code=html]
.topclick {
height: 30px;
width: 60px;
position:relative;
display:inline-block;
}
.ltbox1 {
width: 60px;
height: 30px;
[/code]
|