我正在使用Understrap主题并安装了Owl Carousel插件。我已经加载了所有图像,但是插件不允许我添加文本以显示在图像上。该插件只为您提供一个短代码以添加到您的页面中,以显示轮播,因此我无法手动对其进行编辑(我想?)在哪里可以找到此插件的HTML代码,以便可以添加必要的内容代码使我的文字显示在图像上?
旋转木马的外观如下:
这是WP轮播的外观:
我不知道这是否有帮助,但这是我在原始Bootstrap网站中使用的代码,现在我想在WordPress中重做该代码:
<!-- Owl Carousel Here -->
<div class="owl-carousel owl-one owl-theme">
<div class="item" style="background-image: url(images/owl/festiveRoastVegs.jpg)">
<div class="carousel-caption">
<div>
<h2>Festive Roast Vegetables</h2>
<p class="animated bounceInUp">Using the <b><em>Small Gourmet Roaster</em></b>.</p>
<a class="btn btn-default slider-btn carousel-btn" href="festive-roast-vegetables.html">Go to recipe</a>
</div>
</div>
</div>
<div class="item" style="background-image: url(images/owl/SpicySausageBake.jpg)">
<div class="carousel-caption">
<div>
<h2>Spicy Sausage Noodle Bake</h2>
<p class="animated bounceInUp">Using the <b><em>Medium Classic Roaster</em></b>.</p>
<a class="btn btn-default slider-btn carousel-btn" href="spicy-sausage-and-noodle-bake.html">Go to recipe</a>
</div>
</div>
</div>
.....
<div class="item" style="background-image: url(images/owl/CottagePieBakedPatatoes.jpg)">
<div class="carousel-caption">
<div>
<h2>Cottage Pie Baked Patatoes</h2>
<p class="animated bounceInUp">Using the <b><em>Small Gourmet Roaster</em></b>.</p>
<a class="btn btn-default slider-btn carousel-btn" href="cottage-pie-baked-patatoes.html">Go to recipe</a>
</div>
</div>
</div>
</div> <!-- owl Carousel end -->
和CSS代码:
/* ########## Carousel ########## */
.item {
height: 626px;
background-size:cover;
background-position: 50% 50%;
background-repeat:no-repeat;
}
.carousel-caption {
display: table;
height: 100%;
width: 100%;
min-height: 100%;
left: 0;
top: 0;
z-index: 11;
}
.carousel-caption div {
vertical-align: bottom; /*middle*/
display: table-cell;
position: absolute;
right: 10px;
top: 400px;
}
.carousel-caption h2 {
color: #f6f6f6;
display: inline-block;
text-align: center;
font-size: 40px;
font-weight: 800;
margin-bottom: 40px;
text-shadow: -1px 1px 3px #111;
text-transform: uppercase;
text-align: right;
margin-bottom: 10px;
margin-right: 10px;
display: block;
}
.carousel-caption p {
color: #f6f6f6;
background:#F07D44;
text-align: right;
padding: 5px;
font-size: 20px;
font-weight: 300;
margin-bottom: 10px;
margin-top: 0;
text-shadow:-1px 1px 1px #111;
}
.carousel-btn {
position: absolute;
right: 10px;
}
.slider-btn {
background-color:#205A42;
color: #FFF;
text-transform: uppercase;
width: 130px;
text-align: center;
height: 50px;
line-height:55px;
padding: 0;
font-size: 15px;
font-weight:800;
border-radius: 6px;
border: 0;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
-ms-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
.slider-btn:hover {
background-color: #0d2317;
color:#fff;
}