我的菜单的阴影有问题,当我单击打开子菜单的项目时,打开的子菜单的阴影有问题,并且对为下拉菜单项打开的子菜单的右侧没有任何影响在菜单中,我该怎么办?我很困惑,如果您能获得代码而不是链接,我将不胜感激,谢谢。
#include <iostream>
using namespace std;
int main() {
int a = 251;
int b = 0;
while (a > 0) {
a = a / 10;
b++;
}
int c = 2;
int d = 1;
while (c <= b) {
d = d * 10;
c++;
}
cout << d;
int answer = 0;
int f = d;
int g = 1;
float help;
while (b > 0) {
help = (a / (d * g)) *(d / f);
answer = answer + (int)help;
a = a % (d * g);
g = g * (1 / 10);
f = f * (1 / 10);
b--;
}
cout << answer;
return 0;
}
ul {
/* border: 1px solid #555;*/
position:relative;
font-family: 'Roboto', sans-serif;
list-style: none;
padding: 0;
margin: 0;
background: #FFFFFF;
}
.borderm{
border-right:#606060 0.25px solid;
border-left:#606060 0.25px solid;
}
ul li {
position:relative;
text-align: center;
font-family: 'Roboto', sans-serif;
display: block;
position: relative;
float: right;
background: #FFFFFF;
}
/* This hides the dropdowns */
li ul { display: none;}
ul li a {
font-size: 13px;
font-family: 'Roboto', sans-serif;
display: block;
padding: 1em;
text-decoration: none;
white-space: nowrap;
color: black;
}
/* Display the dropdown */
li:hover > ul {
font-family: 'Roboto', sans-serif;
display: block;
position: absolute;
}
li:hover li { float: none;font-family: 'Roboto', sans-serif;}
li:hover li a:hover { background: #ff4718; color: white;font-family: 'Roboto', sans-serif;}
ul:hover ul{
-webkit-box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) outset;
box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) inset;
-webkit-box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) outset;
-moz-box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) inset;
box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) outset;
}
.main-navigation li ul li { border-top: 0;}
/* Displays second level dropdowns to the right of the first level dropdown */
ul ul ul {
width: 105px;
font-family: 'Roboto', sans-serif;
right: 100.1%;
top: 0;
}
/* Simple clearfix */
ul:before,
ul:after {
font-family: 'Roboto', sans-serif;
content: " "; /* 1 */
display: table; /* 2 */
}
ul:after { clear: both;font-family: 'Roboto', sans-serif;}
.expand{font-size:24px;float: left;margin: -9px -5px;}
.right {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
}
.left {
transform: rotate(135deg);
-webkit-transform: rotate(135deg);
}
.up {
transform: rotate(-135deg);
-webkit-transform: rotate(-135deg);
}
.down {
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
.effect1{
-webkit-box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) inset;
box-shadow:0 8px 8px rgba(0, 0, 0, 0.3), 0 0 80px rgba(0, 0, 0, 0.1) inset;
/*box-shadow: 1px 1px 0px grey;*/
}
.tri
{
width: 0;
height: 0;
border-top: 25px solid transparent;
border-right: 50px solid #555;
border-bottom: 25px solid transparent;
}
答案 0 :(得分:0)
如果您在CSS中有很多ul,这将是解决方案
ul ul ul {
z-index: 1;
}