这是网站:http ://www.mccaonline.com
我被聘用处理网站上的渐变菜单问题。菜单在 Firefox、Chrome 和 Safari 中正常运行 - 当您将鼠标悬停在菜单元素上时,背景变为浅渐变绿色。然而,在 IE8 和 IE9 中,所有子菜单元素都分配有浅绿色渐变背景。
我只是希望它在 Internet Explorer 中具有相同的功能,并且无法弄清楚是什么导致它在所有子菜单元素上都具有渐变背景。我用于导航的 CSS 如下:
#navigation {
background: rgb(100,135,125); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: -moz-linear-gradient(top, rgba(100,135,125,1) 0%, rgba(126,181,165,1) 50%, rgba(126,181,165,1) 52%, rgba(143,190,174,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(100,135,125,1)), color-stop(50%,rgba(126,181,165,1)), color-stop(52%,rgba(126,181,165,1)), color-stop(100%,rgba(143,190,174,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#64877d', endColorstr='#8fbeae',GradientType=0 ); /* IE6-8 */
}
/* HOVER STATE OF NAV BAR */
#navigation ul.nav > li:hover,
#navigation ul.nav > li a:hover,
ul.nav li.current_page_item a,
ul.nav li.current_page_parent a,
ul.nav li.current-menu-ancestor a,
ul.nav li.current-cat a,
ul.nav li.li.current-menu-item a {
background: rgb(100,135,125); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: -moz-linear-gradient(top, rgba(100,135,125,1) 0%, rgba(136,197,158,1) 47%, rgba(196,233,188,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(100,135,125,1)), color-stop(47%,rgba(136,197,158,1)), color-stop(100%,rgba(196,233,188,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#64877d', endColorstr='#c4e9bc',GradientType=0 ); /* IE6-8 */
color: #ffffff;
}
#navigation {
background: rgb(100,135,125); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: -moz-linear-gradient(top, rgba(100,135,125,1) 0%, rgba(126,181,165,1) 50%, rgba(126,181,165,1) 52%, rgba(143,190,174,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(100,135,125,1)), color-stop(50%,rgba(126,181,165,1)), color-stop(52%,rgba(126,181,165,1)), color-stop(100%,rgba(143,190,174,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(100,135,125,1) 0%,rgba(126,181,165,1) 50%,rgba(126,181,165,1) 52%,rgba(143,190,174,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#64877d', endColorstr='#8fbeae',GradientType=0 ); /* IE6-8 */
}
/* HOVER STATE OF NAV BAR */
#navigation ul.nav > li:hover,
#navigation ul.nav > li a:hover,
ul.nav li.current_page_item a,
ul.nav li.current_page_parent a,
ul.nav li.current-menu-ancestor a,
ul.nav li.current-cat a,
ul.nav li.li.current-menu-item a {
background: rgb(100,135,125); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: -moz-linear-gradient(top, rgba(100,135,125,1) 0%, rgba(136,197,158,1) 47%, rgba(196,233,188,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(100,135,125,1)), color-stop(47%,rgba(136,197,158,1)), color-stop(100%,rgba(196,233,188,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* IE10+ */
background: linear-gradient(top, rgba(100,135,125,1) 0%,rgba(136,197,158,1) 47%,rgba(196,233,188,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#64877d', endColorstr='#c4e9bc',GradientType=0 ); /* IE6-8 */
color: #ffffff;
}
让我知道您的想法或可能导致这种情况的原因。我非常感谢任何帮助!