- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我目前正在处理我的导航栏。我遇到的一个问题是,当我向主导航 .navi ul
添加 10px 的填充时,每个菜单项下的所有下拉项都添加了 10px 的空白空间,我就是做不到找出原因。你可以在这里看到这个:http://cbchaverhill.onedirectionconnection.com/
这是我的 CSS:
.navi {
background: #222; /* Show a solid color for older browsers */
background: -moz-linear-gradient(#252525, #0a0a0a);
background: -o-linear-gradient(#252525, #0a0a0a);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* older webkit syntax */
background: -webkit-linear-gradient(#252525, #0a0a0a);
clear: both;
display: block;
float: left;
margin: 0 auto 6px;
width: 100%;
}
.navi ul {
font-size: 13px;
list-style: none;
margin: 0 0 0 -0.8125em;
padding-left: 10px;
}
.navi li {
float: left;
position: relative;
}
.navi a {
color: #eee;
display: block;
line-height: 3.333em;
padding: 0 1.2125em;
text-decoration: none;
font-weight: bold;
}
.navi ul ul {
-moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
box-shadow: 0 3px 3px rgba(0,0,0,0.2);
display: none;
float: left;
margin: 0;
position: absolute;
top: 3.333em;
left: 0;
width: 188px;
z-index: 99999;
}
.navi ul ul ul {
left: 100%;
top: 0;
}
.navi ul ul a {
background: #f9f9f9;
border-bottom: 1px dotted #ddd; color: #444;
font-size: 13px;
font-weight: normal;
height: auto;
line-height: 1.4em;
padding: 10px 10px;
width: 188px;
}
.navi li:hover > a,
.navi ul ul :hover > a,
.navi a:focus {
background: #efefef;
}
.navi li:hover > a,
.navi a:focus {
background: #f9f9f9; /* Show a solid color for older browsers */
background: -moz-linear-gradient(#f9f9f9, #e5e5e5);
background: -o-linear-gradient(#f9f9f9, #e5e5e5);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f9f9f9), to(#e5e5e5)); /* Older webkit syntax */
background: -webkit-linear-gradient(#f9f9f9, #e5e5e5);
color: #373737;
}
.navi ul li:hover > ul {
display: block;
}
.navi
.current-menu-item > a,
.navi .current-menu-ancestor > a,
.navi .current_page_item > a,
.navi .current_page_ancestor > a {
font-weight: bold;
}
如有任何帮助,我们将不胜感激!
最佳答案
应用于 .navi ul
的 css 也适用于嵌套的 ul
。
.navi ul {
padding-left: 10px;
}
解决这个问题的一种方法:
.navi ul ul {
padding-left: 0px;
}
或者:
.navi ul {
font-size: 13px;
list-style: none;
margin: 0 0 0 0;
}
关于css - 我的下 zipper 接旁边有 10 像素的透明空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21492894/
我想在 下面添加按钮标签,但不知道使用什么 CSS 来实现。下图显示了一个可能的场景,“Main_Page”标题和按钮构成了一个单独的 div 的每个部分。我尝试使用 margin-top属性,但想
我的图像不会位于 slider 旁边.. 而只是堆叠在 slider 下方。好像没有空间放置图像,因为 slider 占用了太多空间,但是当我查看代码时,情况似乎并非如此,除非我错过了什么:) Thi
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 6 年前。 Improve
我想在文本的左侧放置一个图像,并根据窗口的分辨率保持原样。 这是没有图像的样子:http://prntscr.com/fmky4f 这是我希望它放置后的样子。 https://prnt.sc/fmkk
我创建了一个button,当我点击button然后popup模型显示时,它会隐藏在页面主体旁边,按钮也会隐藏我滚动。我希望当弹出窗口出现时我无法滚动我的页面主体。我使用 Bootstrap 创建了模型
我是一名学生网络开发人员,需要一些帮助。我需要复制这个 wikipedia page尽我所能 我想把 Story 和下面的 div 放在官方 wiki 页面上的位置。 另一个问题是游戏玩法“div”,
需要这项工作的 header 的屏幕截图: 如您所见,菜单位于 Logo 下方。我想要它旁边的菜单,在 Logo 的右侧。我不知道这是否可行,但如果可行,我需要一些帮助,谢谢。 这是所有内容的代码,为
基本上,我们必须有这样的布局,其中图像必须溢出容器,文本填充图像创建的空间(向左偏移)。 我们目前有这样的结构: Some paragraph
我有一个“弹出式”表格,它是一个固定元素。该表有时太高以适应某些屏幕,因此我将 overflow 设置为 auto。然而,滚动条似乎与弹出表格分离,因为父 div 是屏幕的宽度而表格较小。有没有办法让
我有一个带有边框的 div: 表示上面内容的div使用的样式是这样的: const style = { textAlign: "center", mar
如何在各种屏幕尺寸下完美地放置图像? .background-login { background: url(../img/login.png) no-repeat; background-s
我正在尝试在居中的圆形头像旁边的右上角放置一个编辑图标。但是,如果我在行小部件中使用中心小部件,它就不起作用: Row( children: [
首先,感谢您阅读我的问题! 因此,我遇到了一些有关将单元格名称传递到下一个 View 的问题。现在它会传递它,但只会显示最近加载的单元格。 现在的编程方式如下: var passName = "" v
这是网站:www.red-tuxedo.com 我希望“红色燕尾服”文本位于 Logo 旁边,而不是下方,并且我想摆脱贯穿 Logo 的硬性规定。我的 CSS/HTML 技能达不到要求。当我更改文本时
我有一个顶部水平菜单栏,宽度为 100%,居中对齐,位置固定,因此它不会随页面滚动。 但我还想在菜单左侧的菜单内联一个名称(例如名为 test)。 但即使我使用内联 block ,它也会根据左侧的 d
我有一个 4 个链接。我希望他们都在同一行。其中两个在中间,另外两个在右边。我把它们包了两个又两个,但我无法让它工作。 我的 CSS 是这样的: #links_center { } #links_ri
我在 material-ui 中使用 Grid 组件。我无法让网格元素相互堆叠。现在他们正在彼此堆叠。我不确定是什么让它们堆叠在一起。我已经这样做了,所以只有在小屏幕上网格元素才会堆叠在一起,否则每个
我试图在固定宽度的内联 block div 旁边放置一个按钮。但它就在 div 的下面。我试过减少容器的宽度,但这是行不通的。我想在不将类添加按钮放在单独的容器中的情况下完成此操作。该按钮应位于 .i
我在“聊天气泡”旁边有一个用户的图像,但该图像显示在气泡之后。 我如何将图像放在聊天气泡之前并固定在 div 上? 我的代码在这里:http://www.codepen.io/anon/pen/fFx
编辑 #1:这是问题的图片: 编辑 #2:这是我使用品牌类后的图片 编辑#3: 我正在尝试将图像 float 到导航栏旁边。它一直有效,直到我的导航栏宽度达到 100%。然后导航栏位于图像下方。 这是
我是一名优秀的程序员,十分优秀!