我想在两个背景图像之间添加一个箭头图片图标,使其显示效果如下图。
我的HTML和CSS是这样的
@media (min-width: 1200px)
{
.content {
padding: 25px 0;
}
}
@media (min-width: 1200px)
{
.content {
padding: 48px 0;
}
}
@media (min-width: 992px)
{
.content {
padding: 32px 0;
}
}
@media (min-width: 768px)
{
.content {
padding: 24px 0;
}
}
.content {
padding: 16px 0;
}
section {
background-size: 100% 100%;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
display: block;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
position: relative;
color: #555555;
padding-top: 90px;
background-color: #f4f4f4;
background-color: rgba(244,244,244,1);
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s;
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
body {
/* font-family: 'Helvetica', sans-serif; */
font-family: 'Josefin Sans', sans-serif;
font-weight: 400;
/* font-size: 14px; */
font-size: 20px;
-webkit-font-smoothing: antialiased;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
background-color: #ffffff;
}
Inherited from html.js.flexbox.flexboxlegacy.canvas.canvastext.webgl.no-touch.geolocation.postmessage.websqldatabase.indexeddb.hashchange.history.draganddrop.websockets.rgba.hsla.multiplebgs.backgroundsize.borderimage.borderradius.boxshadow.textshadow.opacity.cssanimations.csscolumns.cssgradients.cssreflections.csstransforms.csstransforms3d.csstransitions.fontface.generatedcontent.video.audio.localstorage.sessionstorage.webworkers.applicationcache.svg.inlinesvg.smil.svgclippaths.nav-down
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
element.style {
animation-delay: 0s;
}
.yellow-boxes .pod-header {
position: absolute;
z-index: 1;
margin: 120px 0px 0px 0px;
width: 100%;
font-weight: bold;
}
.os-animation.animated {
opacity: 1;
}
.os-animation {
opacity: 0;
}
.fadeIn {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
.animated {
-webkit-animation-duration: 1.25s;
animation-duration: 1.25s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.text-center {
text-align: center;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
user agent stylesheet
div {
display: block;
}
Inherited from div.row.overview.os-animation.pod-header.animated.fadeIn
.yellow-boxes .pod-header {
position: absolute;
z-index: 1;
margin: 120px 0px 0px 0px;
width: 100%;
font-weight: bold;
}
.pod-header h2 {
font-weight: bold;
}
.heading, h1, h2, h3, h4, h5, h6, .tables .head {
color: #181818;
color: rgba(24,24,24,1);
}
h1, h2, h3, h4, h5, h6, .heading, nav.main, table thead th, nav.tabs, .btn, button, .link.text-uppercase a, nav.sub, .pricing-menu .head .heading {
line-height: 1.2;
}
@media (min-width: 1200px)
{
h2 {
font-size: 35px;
}
}
@media (min-width: 992px)
{
h2 {
font-size: 30px;
}
}
h1, h2, h3 {
margin-top: 16px 0;
}
h2 {
font-size: 25px;
}
h2, .h2 {
font-size: 30px;
}
h1, .h1, h2, .h2, h3, .h3 {
margin-top: 20px;
margin-bottom: 10px;
}
.yellow-boxes ul.sp-pods {
list-style: none;
text-decoration: none;
margin: 0px 0px 0px 0px;
padding: 0px;
background: url(/media/1058/2.png?anchor=center&mode=crop&width=10&height=10&rnd=131247937640000000);
position: relative;
margin-bottom: -33px !important;
}
ul.sp-pods {
list-style: none;
}
ul {
align-items: center;
}
ul {
margin-left: 16px;
list-style: disc outside;
}
ul, ol {
padding: 0;
margin: 0 0 16px;
line-height: 1.4;
}
ul, ol {
margin-top: 0;
margin-bottom: 10px;
}.yellow-boxes ul.sp-pods li:nth-child(1) {
background: none !important;
width: 15% !important;
}
.yellow-boxes ul.sp-pods li {
display: inline-block;
padding: 200px 40px 50px 40px;
margin: 0px -2px;
box-shadow: none;
border-radius: none;
}
ul.sp-pods li:nth-child(1), ul.sp-pods li:nth-child(5) {
width: 14%;
box-shadow: none;
}
ul.sp-pods li {
width: 20%;
display: inline-block;
padding: 2.5%;
margin: 1%;
box-shadow: 0px 0px 5px rgba(0,0,0,0.2);
border-radius: 4px;
}
li {
margin-bottom: 4px;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
<section class="content advanced-component promo_pods yellow-boxes secondary_colour_3-bg">
<!-- ROW - OVERVIEW -->
<div class="row overview os-animation pod-header animated fadeIn" data-os-animation="fadeIn" data-os-animation-delay="0s" style="animation-delay: 0s;">
<div class="text-center">
<h2 class="heading main ">How it Works</h2>
</div>
</div>
<!--// ROW - OVERVIEW -->
<ul class="sp-pods">
<li style="background:url('https://s15.postimg.org/gof79y13v/image.png?anchor=center&mode=crop&width=10&height=10&rnd=131247937640000000')" class="odd">
</li>
<!-- ROW -->
<li style="background:url('https://s15.postimg.org/gof79y13v/image.png?anchor=center&mode=crop&width=10&height=10&rnd=131247937640000000')" class="even">
<div class="item os-animation odd animated fadeIn" data-os-animation="fadeIn" data-os-animation-delay="0.1s" style="animation-delay: 0.1s;">
<div class="secondary_colour_3-bg">
<div class="image text-center pod-image">
<img src="/media/1023/330-150.png?anchor=center&mode=crop&width=330&height=150&rnd=131238614990000000" alt="">
</div>
<div class="info text-center">
<div class="text "><p><strong>Lorem Ipsum</strong><span> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, </span></p></div>
</div>
</div>
</div>
</li>
<img src="https://s11.postimg.org/crm1nyjar/i15.png"/>
<li style="background:url('https://s14.postimg.org/pwbt15ypd/image.png?anchor=center&mode=crop&width=10&height=10&rnd=131247937640000000')" class="odd">
<div class="item os-animation odd animated fadeIn" data-os-animation="fadeIn" data-os-animation-delay="0.1s" style="animation-delay: 0.1s;">
<div class="secondary_colour_3-bg">
<div class="image text-center pod-image">
<img src="/media/1026/2.png?anchor=center&mode=crop&width=330&height=150&rnd=131238615390000000" alt="">
</div>
<div class="info text-center">
<div class="text "><p><strong>Lorem Ipsum</strong><span> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, </span></p></div>
</div>
</div>
</div>
</li>
<img src="https://s11.postimg.org/crm1nyjar/i15.png" />
<li style="background:url('https://s17.postimg.org/oi039x9v3/image.png?anchor=center&mode=crop&width=10&height=10&rnd=131247937640000000')" class="even">
<div class="item os-animation odd animated fadeIn" data-os-animation="fadeIn" data-os-animation-delay="0.1s" style="animation-delay: 0.1s;">
<div class="secondary_colour_3-bg">
<div class="image text-center pod-image">
<img src="/media/1025/3.png?anchor=center&mode=crop&width=330&height=150&rnd=131238615210000000" alt="">
</div>
<div class="info text-center">
<div class="text "><p><strong>Lorem Ipsum</strong><span> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, </span></p></div>
</div>
</div>
</div>
</li>
<!--// ROW -->
<li style="background:url('https://s17.postimg.org/oi039x9v3/image.png?anchor=center&mode=crop&width=10&height=10&rnd=131247937640000000')" class="odd">
</li>
</ul>
</section>
我找不到一种方法来制作并确保它在响应式情况下工作良好。有没有人能指出更好的方法?
position: absolute;
。 - Ron.Bascoposition
设为absolute
,将其放置在li
元素内,并将li
的position
设为relative
。 - Ron.Basco