你可以
vertical-align
如果设置了元素
display
属性值为
inline-block
.
例如。
/** need to remove the float since we are now using `inline-block` */
.flexslider ul.slides li {
float: none !important;
display: inline-block !important;
vertical-align: bottom;
}
现在将其放入当前代码:
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
directionNav: false
});
});
.flexslider {
width: 500px;
}
.flexslider ul, .flexslider ol {
margin: 0;
padding: 0;
}
.flexslider ul.slides li {
float: none !important;
display: inline-block !important;
vertical-align: bottom;
}
blockquote, q {
font-size: 14px;
quotes: "»" "«" "âº" "â¹";
}
p.quoted {
font-size: 11px;
}
.flex-control-paging li {
float: left;
margin: 2px 4px 2px 0;
}
.flex-control-paging {
box-sizing: border-box;
float: left;
list-style: outside none none;
margin: -24px 0 0;
position: relative;
width: 100%;
z-index: 3;
}
.flex-control-paging a::before {
background-color: #b2b2b2;
content: "";
height: 3px;
left: 0;
position: absolute;
top: 15px;
width: 60px;
}
.flex-control-paging a {
border: 0 none;
cursor: pointer;
display: block;
height: 30px;
position: relative;
text-indent: -999em;
width: 62px;
}
.flex-control-paging .flex-active::before, .flex-control-paging .flex-active:hover::before {
background-color: #000000;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<script src="https://cdn.rawgit.com/woothemes/FlexSlider/master/jquery.flexslider-min.js" type="text/javascript"></script>
<div class="flexslider">
<ul class="slides">
<li><div><q>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</q> <p class="quoted">Lorem ipsum</p></div></li>
<li><div><q>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</q> <p class="quoted">Lorem ipsum</p></div></li>
<li><div><q>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</q> <p class="quoted">Lorem ipsum</p></div></li>
</ul>
</div>