gpt4 book ai didi

Css 菜单浏览器问题

转载 作者:太空宇宙 更新时间:2023-11-04 11:21:51 25 4
gpt4 key购买 nike

/* Main Nav */
/* Positioning */
#banner nav {
margin-top: 14.2em;
margin-bottom: 0;;
margin-left: 0;
}

#cssmenu,
#cssmenu ul,
#cssmenu li,
#cssmenu a {
border: none;
line-height: 1;
margin: 0 ;
padding: 0;
}

#cssmenu {
margin:auto;
border-top:1px solid #000;
height: 37px;
display: block;
width: auto;
margin: 0;
padding: 0;
}

#cssmenu > ul {
list-style: inside none;
margin: auto;
padding: 0;
}

#cssmenu > ul > li {
list-style: inside none;
float: left;
display: inline-block;
position: relative;
margin: 0;
padding: 0;
}

#cssmenu.align-center > ul {
text-align: center;
}

#cssmenu.align-center > ul > li {
float: none;
}

#cssmenu.align-center ul ul {
text-align: left;
}

#cssmenu > ul > li > a {
outline: none;
display: block;
position: relative;
text-align: center;
text-decoration: none;
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
font-weight: 700;
font-size: 13px;
font-family: Arial, Helvetica, sans-serif;
border-color:transparent;
border-left:1px solid #000;
border-bottom:1px solid #000;
border-right:1px solid #000;
margin-bottom:4px;
color: #FFFFFF;
padding: 12px 34px;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
-moz-outline-radius-bottomleft:10px;
-moz-border-radius-bottomright:10px;
-webkit-border-bottom-left-radius:10px;
-webkit-border-bottom-right-radius:10px;
background: -moz-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #007df8), color-stop(100%, #07275d));
background: -webkit-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -o-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -ms-linear-gradient(top, #007df8 0%, #07275d 100%);
background: linear-gradient(top, #007df8 0%, #07275d 100%);
}

#cssmenu > ul > li.last > a{
width:64px;
}

#cssmenu > ul > li > a:after {
content: "";
position: absolute;
top: -1px;
bottom: -1px;
right: -2px;
z-index: 102;
border-color: #000000;
}

#cssmenu > ul > li.last > a:after {
border-right:none
}

#cssmenu ul li.has-sub:hover > a:after {
top: 0;
bottom: 0;
}

#cssmenu > ul > li.has-sub > a:before {
content: "";
position: absolute;
top: 18px;
right: 10px;
border: 5px solid transparent;
border-top: 5px solid #000;
}

#cssmenu > ul > li.has-sub:hover > a:before {
top: 19px;
}

#cssmenu > ul > li.has-sub:hover > a {
padding-bottom: 12px;
z-index: 999;
border-color: transparent;
background:#07275d;

}

#cssmenu ul li.has-sub:hover > ul,
#cssmenu ul li.has-sub:hover > div {
display: block;
}

#cssmenu > ul > li.has-sub > a:hover
#cssmenu > ul > li.has-sub:hover > a {
border-color: #000;
}

#cssmenu ul li > ul,
#cssmenu ul li > div {
display: none;
width: auto;
position: absolute;
top: 40px;
background: #07275d;
z-index: 999;
padding: 10px 0;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
-moz-outline-radius-bottomleft:10px;
-moz-border-radius-bottomright:10px;
-webkit-border-bottom-left-radius:10px;
-webkit-border-bottom-right-radius:10px;
}

#cssmenu ul li > ul {
width: 200px;
}

#cssmenu ul ul ul {
position: absolute;
}

#cssmenu ul ul li:hover > ul {
left: 100%;
top: -10px;
}

#cssmenu ul li > ul li {
display: block;
list-style: inside none;
position: relative;
margin: 0;
padding: 0;
}

#cssmenu ul li > ul li a {
outline: none;
display: block;
position: relative;
font: 10pt Arial, Helvetica, sans-serif;
color: #FFFFFF;
text-decoration: none;
text-align:center;
margin: 0;
padding: 8px 0px;
border-radius:10px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
}

#cssmenu ul ul li a:hover {
background: -moz-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #007df8), color-stop(100%, #07275d));
background: -webkit-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -o-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -ms-linear-gradient(top, #007df8 0%, #07275d 100%);
background: linear-gradient(top, #007df8 0%, #07275d 100%);
}

#cssmenu > ul > li > a:hover {
background: #07275d;
color: #FFFFFF;
}

#cssmenu > ul > li.has-sub > a:hover:before {
border-top: 5px solid #FFFFFF;
}

/* Featured */
#featured {
margin-top:0.3em;
margin-bottom: 2em;background: -moz-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #007df8), color-stop(100%, #07275d));
background: -webkit-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -o-linear-gradient(top, #007df8 0%, #07275d 100%);
background: -ms-linear-gradient(top, #007df8 0%, #07275d 100%);
background: linear-gradient(top, #007df8 0%, #07275d 100%);
overflow: hidden;
padding: 20px;
padding-bottom:0;
width: 760px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}

您好,我制作了一个 css 菜单,它也可以完美地工作,但我刚刚在 Microsoft Edge 和 Mozilla Firefox 中对其进行测试后注意到,在右侧的 Microsoft Edge 中有一个微小的差距,无法找到为什么可以有人帮我吗 Live Preview这里还附上了我的菜单 css 代码

提前致谢

最佳答案

请使用此代码并在此 css 中应用您的颜色样式

#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #menu-button {
margin: 0;
padding: 0;
border: 0;
list-style: none;
line-height: 1;
display: block;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#cssmenu:after,
#cssmenu > ul:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
#cssmenu #menu-button {
display: none;
}
#cssmenu {
font-family: Montserrat, sans-serif;
background: #333333;
}
#cssmenu > ul > li {
float: left;
}
#cssmenu.align-center > ul {
font-size: 0;
text-align: center;
}
#cssmenu.align-center > ul > li {
display: inline-block;
float: none;
}
#cssmenu.align-center ul ul {
text-align: left;
}
#cssmenu.align-right > ul > li {
float: right;
}
#cssmenu > ul > li > a {
padding: 17px;
font-size: 12px;
letter-spacing: 1px;
text-decoration: none;
color: #dddddd;
font-weight: 700;
text-transform: uppercase;
}
#cssmenu > ul > li:hover > a {
color: #ffffff;
}
#cssmenu > ul > li.has-sub > a {
padding-right: 30px;
}
#cssmenu > ul > li.has-sub > a:after {
position: absolute;
top: 22px;
right: 11px;
width: 8px;
height: 2px;
display: block;
background: #dddddd;
content: '';
}
#cssmenu > ul > li.has-sub > a:before {
position: absolute;
top: 19px;
right: 14px;
display: block;
width: 2px;
height: 8px;
background: #dddddd;
content: '';
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
#cssmenu > ul > li.has-sub:hover > a:before {
top: 23px;
height: 0;
}
#cssmenu ul ul {
position: absolute;
left: -9999px;
}
#cssmenu.align-right ul ul {
text-align: right;
}
#cssmenu ul ul li {
height: 0;
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
#cssmenu li:hover > ul {
left: auto;
}
#cssmenu.align-right li:hover > ul {
left: auto;
right: 0;
}
#cssmenu li:hover > ul > li {
height: 35px;
}
#cssmenu ul ul ul {
margin-left: 100%;
top: 0;
}
#cssmenu.align-right ul ul ul {
margin-left: 0;
margin-right: 100%;
}
#cssmenu ul ul li a {
border-bottom: 1px solid rgba(150, 150, 150, 0.15);
padding: 11px 15px;
width: 170px;
font-size: 12px;
text-decoration: none;
color: #dddddd;
font-weight: 400;
background: #333333;
}
#cssmenu ul ul li:last-child > a,
#cssmenu ul ul li.last-item > a {
border-bottom: 0;
}
#cssmenu ul ul li:hover > a,
#cssmenu ul ul li a:hover {
color: #ffffff;
}
#cssmenu ul ul li.has-sub > a:after {
position: absolute;
top: 16px;
right: 11px;
width: 8px;
height: 2px;
display: block;
background: #dddddd;
content: '';
}
#cssmenu.align-right ul ul li.has-sub > a:after {
right: auto;
left: 11px;
}
#cssmenu ul ul li.has-sub > a:before {
position: absolute;
top: 13px;
right: 14px;
display: block;
width: 2px;
height: 8px;
background: #dddddd;
content: '';
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
#cssmenu.align-right ul ul li.has-sub > a:before {
right: auto;
left: 14px;
}
#cssmenu ul ul > li.has-sub:hover > a:before {
top: 17px;
height: 0;
}
#cssmenu.small-screen {
width: 100%;
}
#cssmenu.small-screen ul {
width: 100%;
display: none;
}
#cssmenu.small-screen.align-center > ul {
text-align: left;
}
#cssmenu.small-screen ul li {
width: 100%;
border-top: 1px solid rgba(120, 120, 120, 0.2);
}
#cssmenu.small-screen ul ul li,
#cssmenu.small-screen li:hover > ul > li {
height: auto;
}
#cssmenu.small-screen ul li a,
#cssmenu.small-screen ul ul li a {
width: 100%;
border-bottom: 0;
}
#cssmenu.small-screen > ul > li {
float: none;
}
#cssmenu.small-screen ul ul li a {
padding-left: 25px;
}
#cssmenu.small-screen ul ul ul li a {
padding-left: 35px;
}
#cssmenu.small-screen ul ul li a {
color: #dddddd;
background: none;
}
#cssmenu.small-screen ul ul li:hover > a,
#cssmenu.small-screen ul ul li.active > a {
color: #ffffff;
}
#cssmenu.small-screen ul ul,
#cssmenu.small-screen ul ul ul,
#cssmenu.small-screen.align-right ul ul {
position: relative;
left: 0;
width: 100%;
margin: 0;
text-align: left;
}
#cssmenu.small-screen > ul > li.has-sub > a:after,
#cssmenu.small-screen > ul > li.has-sub > a:before,
#cssmenu.small-screen ul ul > li.has-sub > a:after,
#cssmenu.small-screen ul ul > li.has-sub > a:before {
display: none;
}
#cssmenu.small-screen #menu-button {
display: block;
padding: 17px;
color: #dddddd;
cursor: pointer;
font-size: 12px;
text-transform: uppercase;
font-weight: 700;
}
#cssmenu.small-screen #menu-button:after {
position: absolute;
top: 22px;
right: 17px;
display: block;
height: 4px;
width: 20px;
border-top: 2px solid #dddddd;
border-bottom: 2px solid #dddddd;
content: '';
}
#cssmenu.small-screen #menu-button:before {
position: absolute;
top: 16px;
right: 17px;
display: block;
height: 2px;
width: 20px;
background: #dddddd;
content: '';
}
#cssmenu.small-screen #menu-button.menu-opened:after {
top: 23px;
border: 0;
height: 2px;
width: 15px;
background: #ffffff;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
#cssmenu.small-screen #menu-button.menu-opened:before {
top: 23px;
background: #ffffff;
width: 15px;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
#cssmenu.small-screen .submenu-button {
position: absolute;
z-index: 99;
right: 0;
top: 0;
display: block;
border-left: 1px solid rgba(120, 120, 120, 0.2);
height: 46px;
width: 46px;
cursor: pointer;
}
#cssmenu.small-screen .submenu-button.submenu-opened {
background: #262626;
}
#cssmenu.small-screen ul ul .submenu-button {
height: 34px;
width: 34px;
}
#cssmenu.small-screen .submenu-button:after {
position: absolute;
top: 22px;
right: 19px;
width: 8px;
height: 2px;
display: block;
background: #dddddd;
content: '';
}
#cssmenu.small-screen ul ul .submenu-button:after {
top: 15px;
right: 13px;
}
#cssmenu.small-screen .submenu-button.submenu-opened:after {
background: #ffffff;
}
#cssmenu.small-screen .submenu-button:before {
position: absolute;
top: 19px;
right: 22px;
display: block;
width: 2px;
height: 8px;
background: #dddddd;
content: '';
}
#cssmenu.small-screen ul ul .submenu-button:before {
top: 12px;
right: 16px;
}
#cssmenu.small-screen .submenu-button.submenu-opened:before {
display: none;
}
#cssmenu.small-screen.select-list {
padding: 5px;
}

关于Css 菜单浏览器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32708666/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com