- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我必须实现这样的目标:
我决定将 ol 与背景图像一起使用。
这是我的 html 和 css:
//html
<ol>
<li class="step1">
<p>Text Text TextTextTextTextText TextTextTextTextTextText
TextTextTextTextTextTextTextText TextTextTextTextTextTextText </p>
</li>
<li class="step2">
<p>Text Text TextTextTextTextText TextTextTextTextTextText
TextTextTextTextTextTextTextText TextTextTextTextTextTextText </p>
</li>
<li class="step3">
<p>Text Text TextTextTextTextText TextTextTextTextTextText
TextTextTextTextTextTextTextText TextTextTextTextTextTextText </p>
</li>
</ol>
//CSS
ol {
list-style-position: inside;
list-style: none;
font-size: 25px;
}
ol li {
background-image: url(../images/poga_zala_fons.png), url(../images/Nr1.png);
background-position: -5px 0, -5px 0;
background-repeat: no-repeat;
padding-left: 7px;
}
ol li.step1 p {
background-color: #99cc33;
margin-left: 10px;
z-index: -1;
}
ol li.step2 p {
background-color: #ffff99;
}
ol li.step3 p {
background-color: #ffcc00;
}
ol li p {
font-size: 12px;
}
1) 有很多问题,但第一个是我无法让 ol 的背景图像覆盖段落背景的背景图像。
2) 其次,我不确定使用 ol/li 的想法是最好的,也许还有其他一些不错的建议如何更好地实现图像中的思考?请给我一些线索,我不是在问确切的解决方案。
我是 php 程序员,但对创建 CSS 设计还很陌生。
最佳答案
有很多可能的解决方案......如果你想保留列表(因为“语义”),这里是一个:
HTML:
<ul id="list">
<li class="step1">
<div class='bgr'>
<p class='txt'>
Look for the CITYrefund.eu logo when doing your shopping- this is the sign that particular shop participate in CITYrefund Tax Free service system*. Tell the shop assistant that you want to use CITYrefund Tax Free system and show your passport or national ID card. The shop assistant will give you the SPECIAL TYPE OF FORM. Fill in and sign the customer sections of the form in the presence of the shop assistant. *If the shop isn't yet registered in CITYrefund Tax Free service system, you can always use our SPECIAL TYPE OF FORM "B" in almost any shop in Riga.
</p>
</div>
</li>
<li class="step2">
<p>You must export the goods (that is, take them out of the EU with you) by the last day of the third month after the one in which you buy them. Show your goods, till receipts and SPECIAL TYPE OF FORMS to a Latvian customs officer or to customs in the last EU country you visit. You must get your SPECIAL TYPE OF FORM checked and stamped by a customs officer.</p>
</li>
<li class="step3">
<p>Get your VAT refund by CITYrefund.eu according to your choosed options. Register your SPECIAL TYPE OF FORMS and till receipts online and then mail the original copies to our office address: CITYrefund Latvia SIA, Pakalninu iela 4, Tīraine, Latvia.</p>
</li>
</ul>
CSS:
#list {
list-style-type:none;
width:680px;
}
.step1 {
background-image:url(number.jpg);
background-repeat:no-repeat;
height:319px;
/*width:? */
margin:0;
padding:0;
z-index:99;
position:relative;
}
.step1 .bgr {
position:absolute;
top:0;
padding:0;
margin:0;
left:166px;
background-color:#99cc33;
height:100%;
/*width:?*/
}
.step1 .txt {
padding:20px;
margin-top:30px;
}
当然,您将不得不调整大小、边距、填充,但我希望您明白...
关于css - ol bg图像应该超过li bg图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17010183/
如果这个在过去有效,但突然就不行了。下面是结构:Thre 也有一个设置和控制,背景颜色和图像设置都单独工作,但是当我有两个设置时它不会工作,最初我让它工作,颜色总是工作,除非选择背景图像,那会覆盖它,
我有一个网站,它通过加入 body 标签的 bg 和 div 标签的 bgs 来完成布局。但是,根据您使用的浏览器和操作系统,由于滚动条,它们似乎无法准确匹配。 (我已经通过添加 overflow:h
我正在尝试根据用户将鼠标悬停在求职者按钮还是招聘人员按钮上来更改背景图片。 我尝试了以下代码(在 JS Fiddle 中有效)但失败了。我插入了一个 background-color 命令(参见注释行
所以我有一个包含几行内容的部分。线条覆盖了窗口宽度的 100%,但是内容仅显示在部分的右侧。左边必须有一个图像。我试着用 bg-image 和 z-index 来做,但问题是它被埋在线条的 bg-co
与 Bootstrap 的 bg-danger 类关联的背景颜色未应用于类 form-control 的输入文本框。如何做到这一点? 最佳答案 form-co
我在有序列表中显示代码,以便它显示行号。每个 li 都有一个 pre 标签,其中填充了一行代码。 我的问题是,当我设置 ol 的宽度并允许溢出滚动时,溢出的背景颜色与最初显示区域的背景颜色不同。 ol
例如,在一列中我有 3 个 block (div),在第二列中我有其他 block 的列表 (div)。 第一列 block 代表蛋糕层,第二列 block 代表可以应用于任何蛋糕层的口味。 因此,通
我正在处理日期和时间的本地化代码,当文化设置为保加利亚语并且我传入的日期是 11 月时,我看到了一个奇怪的行为。 本质上,我正在尝试调用: if (DateTime.TryParse(theDateT
在下图中,viewController 背景为白色,pageViewController 背景颜色可见。如何清除或透明 viewController 背景,以便紫罗兰色成为所有 viewControl
阅读 pygame 教程 here ,你会发现这个例子:(箭头是我的) for o in objects: screen.blit(background, o.pos, o.pos) # Re
我制作了一个播放背景音乐的服务,但是当音乐结束时我想再次重播它。我可以在我的服务中使用哪种方法? public class BackgroundSoundService extends Service
我正在设计一个由大量元素组成的常规 android LinearLayout,我将布局参数都设置为 wrap_content 并使其环绕 bg 或 elements 根据哪个更大,那么,如何分配布局,
我有一个像 BasicCell>ContentView>Container 这样的 UITableView 单元设置。当我在界面生成器中设置容器的背景时,我得到了我设置的所需的深灰色阴影。但是,当我以
我正在尝试制作我的横幅图片,目前它的全宽约为 1500 像素,我已将其设置为背景图片,这样我就可以在顶部使用一些元素,我知道你可以制作一个全宽的图片标签,但我不确定您是否可以对背景图片标签执行相同的操
我这里有这样的背景 background:url(../img/arrow_lch.png) right no-repeat #2e443a; 我只需要降低 bg color(#2e443a) 不透明
我的网站有一个看起来很酷的背景,但可能会影响可用性(如果你看得太久它会烧毁)所以我想要一个链接,可以用 javascript 更改/删除背景图像。我用谷歌搜索过,但找不到有用的东西。 有没有办法建立一
我想将视差滚动效果添加到我主页的 .intro-body 中,就像我将此效果添加到我的“关于”中的超大屏幕图像中一样、“简历”和“作品集”页面。然而,出于某种原因,当我将它应用于 .bg 类时,背景图
我得到了一个名为remove.bg 的API。我想在Flutter应用中使用此API(以python语言提供)。可能吗 此API用于删除图像背景。 为了使此功能正常工作,我需要执行哪些步骤/研究? 进
每当我将鼠标悬停在某个元素上时,我都会尝试更改页面背景。目前我已经将不同的图像上传到我的网络服务器中,当我将鼠标悬停在 div 上时,我想将页面背景从其中一个图像更改为另一张图像。我该怎么做呢?无论是
我这里有一段非常基本的 R 代码,以及它生成的图。为什么圆点没有填成红色? plot(1, 1, col="blue", bg="red", cex=4) 最佳答案 您需要使用 pch = 21 到
我是一名优秀的程序员,十分优秀!