Flexslider具有strage行为,当我加载我的网页而没有激活flexslider(但加载flexslider.css)时,你会看到类似这样的东西
红色边框是ul,黑色边框是li,li元素是居中的。但是当我加载flexslider。你可以在控制台上$('.flexslider').flexslider();
得到类似的东西
HTML
<div class="slider clearfix">
<div class="flex-container">
<div class="flexslider loading " style="text-align:center;">
<ul class="search-results slides" style="border: 2px solid; border-radius: 25px; border-color:red; margin:0 auto;">
<li class="search-entry container" style="border: 2px solid; border-radius: 25px;">
<div>
<div class="contain">
<img src ="<?php get_theme_url(); ?>/images/slider-bg-1.jpg">
</div>
</div>
</li>
<li class="search-entry container" style="border: 2px solid; border-radius: 25px;">
<div>
<div class="contain">
<img src ="<?php get_theme_url(); ?>/images/slider-bg-2.jpg">
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
css css file