- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
http://fiddle.jshell.net/hutber/uAczq/是解释它的最简单方法。
/html
<div title="1%">
1%
<div class="background rating_90"></div>
</div>
//css
.rating {
display: block;
width: 100%;
height: 18px;
line-height: 18px;
border: 1px solid #7F7F7F;
position: relative;
text-align: center;
border-radius: 3px;
}
.rating .background.rating_90 {
width: 90%;
}
.rating .background {
height: 100%;
position: absolute;
top: 0;
left: 0;
content: "";
background-color: #75890C;
border-right: 1px solid #7F7F7F;
}
目前,里面的文字是不可见的,.background
位于文字的前面。
我不想在父 div
中添加另一个元素
最佳答案
使用 z-index: -1
。
z-index 只能用于明确定位的元素。这意味着任何具有 position: relative;
或 position: absolute;
的内容都可以定位在 Z Pane 中,或者为了更好地理解页面中的“深度”级别。
做:
.rating .background {
z-index: -1;
/* The rest of your CSS */
}
您还可以删除 content: '';
因为它对非伪选择器没有影响。
关于html - 内容不在内容 HTML 后面的元素前面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24779055/
很高兴和你分享一些有关写python代码的经验,简直就像是品尝一口甜甜的草莓冰淇淋。每当我开始写python代码的时候,就仿佛是开启了一段奇妙的冒险,每一行代码都是我的剧情发展,每一个bug都是我的挑
我有一张看起来像这样的 table , Date Value 01/01/2010 03:59:00 324.44 01/02/2010 09:31:00
我已尽我所能检查但未找到任何 kwds允许您在 y=a-x 上画一条线(例如 pandas )散点图(不一定是最佳拟合线)并将其带到后面(或前面)。 #the data frame ax=df.plo
我已尽我所能检查但未找到任何 kwds允许您在 y=a-x 上画一条线(例如 pandas )散点图(不一定是最佳拟合线)并将其带到后面(或前面)。 #the data frame ax=df.plo
我正在尝试在书签中使用 jquery UI 作为 slider 。并且 jquery ui 要求在普通 jquery 文件之后包含该文件。 所以到目前为止我所尝试的只是将脚本附加到 header ,同
我正在尝试将 div (.portrait_text) 添加到容器 (.gallery_container) 中: 每个图像都会添加到其相应的 .gallery_container 前面。但我也想将
因此,为了避免让自己头疼(反而制造头疼),我试图将一个字符串数组成员放在同名的结构变量前面,但它不起作用并给我一个错误:std::string {aka class std::basic_string
嗨,我的索引页面上的下拉菜单有问题,下拉元素隐藏在我的图像 slider 下方,它位于我的导航栏正下方,我希望能够看到下拉菜单元素,任何帮助将不胜感激非常感谢; 这是我的导航栏 html:
我想在 div 前面移动一个按钮。 http://demo.gbaus.com/index.html在网站中,获取报价按钮不可点击,除非您点击最底部。我希望将它移到前面,以便您可以单击它。 posot
我有一个以时隙为键的 map ,指向分配的客户。并非所有时隙都有指定的客户,它可能既稀疏又密集,所以我坚持使用 map。执行。如果存在分配,则仅存在键。 计数器从槽 1 计数到槽 x,并在每个槽检查分
我有三个 Controller 。一个是 HomeViewController 启动 BlahPageViewController 并且它是单独的页面。其他两个 Controller (BlahPag
我有一个文本区域。我可以设置它的文本 $("#mytextarea").text("foo") 我可以像这样添加到文本区域: $("#mytextarea").prepend("foo") 但是我不能
我喜欢在绘图时生成我自己的网格线,这样我就可以控制刻度线等,我正在用“hist”绘图程序来解决这个问题。 hist(WindSpeed, breaks=c(0:31), freq=TRUE,
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
当我用 Java 发送电子邮件时,如果单词“From”是任何行的第一个单词,则在该单词的开头附加一个“>”字符,我该如何阻止这种情况? 这是我的文字: The following transactio
我有这一行输出 span 标记的名称值: $(this).text($(this).attr("name")); 在“名称”值之前添加字符(特别是美元符号 ($))的最佳方式是什么。 最佳答案 尝试:
在我调用 segue 返回到以前的 View Controller 之一后,我一直在努力解决我的选项卡栏被隐藏的问题。 我读到,在segue之后, View 覆盖了标签栏。有没有办法将标签栏放在 Vi
我的目标是有一个窗口,其中背景有 2 个不同颜色的面板。它们各自覆盖屏幕的特定百分比,并且会定期变化。我通过创建一个 JSplitPane 来做到这一点。但现在我想添加一个 JLabel 在屏幕中间的
我试图让我的导航栏在滚动时出现在正文的顶部。目前它在下面,如图所示。 我还有一个抽屉导航,它在引入 ScrollView 后就停止工作了……我觉得这可能是因为当我单击“汉堡包”图标时,它实际上位于 S
我之前问过类似的问题,但可能不清楚。 我有一个在 Amazon Elastic beanstalk 上运行的 Web 服务 (tomcat 8),它运行良好。然后我在 DomainA.com 上运行网
我是一名优秀的程序员,十分优秀!