我有一个侧边导航,采用标准的
我已经完全在CSS中实现了这个功能,但是遇到了异常情况: 当:hover时,我将锚点的宽度设置为自动。触发1秒延迟后,锚点的宽度突然变为0,然后才扩展到其完整宽度。
以下是我的CSS代码,您可以在此处查看我的当前代码: http://eventfeedstl.com/day/07182011/
<ul><li><a></a></li></ul>
格式,使用overflow hidden截断链接的完整文本。在悬停1秒后,我希望锚点扩展宽度,显示链接的完整文本。我已经完全在CSS中实现了这个功能,但是遇到了异常情况: 当:hover时,我将锚点的宽度设置为自动。触发1秒延迟后,锚点的宽度突然变为0,然后才扩展到其完整宽度。
以下是我的CSS代码,您可以在此处查看我的当前代码: http://eventfeedstl.com/day/07182011/
.day .sidebar{
width: 200px;
}
.day .sidebar ul {
list-style: none;
padding: 0;
margin:0;
position: absolute;
width: auto;
}
.day .sidebar ul li{
border-bottom: 1px solid #626666;
display: relative;
width: 200px;
}
.day .sidebar ul li:hover{
width: auto;
}
.day .sidebar ul li a{
font-weight: normal;
font-size: .8em;
color: #f2f2f2;
display: block;
width: auto;
padding: 4px 5px;
background: none;
width: 190px;
height: 10px;
overflow: hidden;
position: relative;
z-index: 10;
-webkit-transition: background 1.3s ease-out;
-moz-transition: background 1.3s ease-out;
transition: background-color 1.3s ease-out;
}
.day .sidebar ul li a:hover {
background: #797979;
-webkit-transition: background 0.15s;
-moz-transition: background 0.15s;
transition: background 0.15s;
text-decoration: none;
width: auto;
-webkit-transition-property:width;
-webkit-transition-delay:1s;
position: relative;
}