我想减少下拉菜单上的正确空间。
尝试过:
.dropotron li {
box-shadow: inset 0 1px 0 0 #e6e6e6;
padding-right: 0 !important;
}
但是没有成功。有什么想法吗?
我的 CSS:
.dropotron {
list-style: none;
padding: 0;
background: #fff;
color: #444;
min-width: 13em;
padding: 0.75em;
margin-top: -0.5em;
font-family: "Raleway", Helvetica, sans-serif;
font-weight: 500;
text-transform: uppercase;
box-shadow: 0 0 0.125em 0 rgba(0, 0, 0, 0.35);
}
.dropotron li {
box-shadow: inset 0 1px 0 0 #e6e6e6;
padding-right: 0 !important;
}
.dropotron li:first-child {
box-shadow: none;
}
.dropotron a {
color: inherit;
text-decoration: none;
letter-spacing: 0.05em;
font-size: 0.8em;
display: block;
line-height: 3em;
border: 0;
}
.dropotron.level-0 {
margin-top: 0;
}
.dropotron.level-0:before {
content: '';
border-left: solid 0.5em transparent;
border-right: solid 0.5em transparent;
border-bottom: solid 0.5em #fff;
display: block;
position: absolute;
top: -0.45em;
left: 50%;
margin-left: -0.25em;
}
我的 HTML:
<li>
<a href="#" class="submenu fa-angle-down"><a href="#" class="image"><img src="images/flag1_a.png" alt="" /></a>
<ul>
<li><a href="#" class="image"><img src="images/flag2.png" alt="" /></a></li>
<li><a href="#" class="image"><img src="images/flag3.png" alt="" /></a></li>
<li><a href="#" class="image"><img src="images/flag4.png" alt="" /></a></li>
</ul>
</li>
最佳答案
没有示例可以解决,我只是在猜测,但我认为可能是 .droptotron
类上的 min-width: 13em;
正在控制宽度。尝试减少它,看看它是否有帮助。
关于html - Dropotron 左填充不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42981601/