需要更改css中滑动门菜单中列表项的背景色
这看起来很简单,但我无法更改css中滑动门菜单中列表项的背景色。我已将左边框更改为绿色,将每个列表项的文本更改为白色,但无法更改背景色。代码如下:需要更改css中滑动门菜单中列表项的背景色,css,Css,这看起来很简单,但我无法更改css中滑动门菜单中列表项的背景色。我已将左边框更改为绿色,将每个列表项的文本更改为白色,但无法更改背景色。代码如下: .slidedoormenu { list-style-type: none; margin: 0; padding: 0; width: 180px; /* width of menu (don't forget to add border with below!) */ border-left: 8px s
.slidedoormenu
{
list-style-type: none;
margin: 0;
padding: 0;
width: 180px; /* width of menu (don't forget to add border with below!) */
border-left: 8px solid #007f00; /* thick left border of menu */
}
.slidedoormenu li
{
border-bottom: 1px solid #885b5c; /* Gray border beneath each menu item */
}
.slidedoormenu li a
{
background: white url(media/vstrip.gif) repeat-y left top; /* Background image positioned to the left(v) top(h) corner initially */
font: bold 16px "Lucida Grande" , "Trebuchet MS" , Verdana;
display: block;
color: white;
width: auto;
border-bottom: 1px solid white; /* White border beneath each menu item link, to add depth */
padding: 7px 0; /* Vertical (top/bottom) padding for each menu link */
text-indent: 8px;
text-decoration: none;
}
.slidedoormenu li a:visited, .slidedoormenu li a:active
{
color: white;
}
.slidedoormenu li a:hover
{
background-position: -387px 0; /* Shift background image horizontally 387px, or the start of the 2nd background image */
}
.slidedoormenu li.lastitem, .slidedoormenu li.lastitem a
{
border-bottom-width: 0; /* For last menu item within menu, remove bottom border */
}
.slidedoormenu li.lastitem a
{
padding: 8px 0; /* increase vertical border of last menu link by 2px (default is padding: 7px 0) to account for removed border width */
}
我不明白为什么这不管用
.slidedoormenu li{
background-color:#3a8f07;
border-bottom: 1px solid #885b5c; /* Gray border beneath each menu item */}
我也很困惑。我无法改变“li”的背景色。我想我已经找到了答案。vstrip.gif设置为粉红色。我得修改一下。