css边框淡出
我有一个由下面的 css 创建的边框。 .left
是一个 div,.left-menu
是嵌套在 .left
内的 ASP.NET 菜单控件。当边框在 IE、FF 和 Chrome 中渲染时,会发生一些我不明白的事情。边界最初出现,然后慢慢消失并完全消失。没有运行 JavaScript。它看起来不是动画,也不是渐变。边框最初出现,然后立即开始淡入白色背景,然后完全消失。整个过程大约需要2-3秒。如果我将颜色更改为 #ff0000 之类的颜色,边框将保留并且不会消失。
.left
{
min-height: 400px;
padding: 0px;
margin: 0px;
padding-top: 50px;
border-right: 2px solid #f1f1f2;
float: left;
}
.left-menu, .left-menu ul
{
width: 100% !important;
}
.left-menu ul li a
{
padding: 10px;
padding-left: 25px;
padding-right: 50px;
}
I have a border created by the css below. .left
is a div and and .left-menu
is an ASP.NET menu control nested inside .left
. Something I don't understand happens when the border is rendered in IE, FF and Chrome. The border appears initially and then slowly fades away and disappears completely. There is no javascript running. It doesn't appear to be an animation and is NOT a gradient. The border appears initially and then immediately begins to fade into the white background and then completely disappears. The whole thing takes about 2-3 seconds. If I change the color to something like #ff0000, the border remains and does NOT fade away.
.left
{
min-height: 400px;
padding: 0px;
margin: 0px;
padding-top: 50px;
border-right: 2px solid #f1f1f2;
float: left;
}
.left-menu, .left-menu ul
{
width: 100% !important;
}
.left-menu ul li a
{
padding: 10px;
padding-left: 25px;
padding-right: 50px;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以我发现问题其实是由ASP.NET菜单控件生成的流氓javascript。 DisappearAfter 属性正在被操纵,并且实际上在渲染后立即淡出边框。奇怪的是,这个功能是有缺陷的,因为菜单上方的 div 上不相关的边框也被删除了。此外,将边框颜色从菜单鼠标悬停颜色更改为另一种颜色会保留边框。
So I discovered the problem is, in fact, rogue javascript generated by the ASP.NET menu control. The DisappearAfter property is being manipulated and actually fades out the border immediately after rendering. Oddly enough, this functionality is buggy, since an unrelated border on the div above the menu is removed as well. Also, changing the border color from the menu mouseover color to another color persists the border.