我正在尝试创建一个div,我正在调用post缩略图,以识别flexcroll,但它无效。它适用于文本,但不是这样:
<div class="post">
<?php query_posts( 'p=77' );
while (have_posts()) : the_post();?>
<div id="contcell" class="flexcroll">
<div id="thumb" ><?php echo get_the_post_thumbnail($post->ID, 'full'); ?></div></div>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
</div>
这些是相关的css:
#contcell {width:1116px; height:300px; overflow:auto;}
.thumb {width:1116px; height:768px;}
如果我禁用flexcroll类,则浏览器默认滚动条有效。 有任何想法吗? Thx提前。
答案 0 :(得分:0)
解决了它。这不是在flexcroll div中加载什么,而是清除其内容的浮点数的问题。在flexcroll用户指南示例中找到它:
<div id='mycustomscroll' class='flexcroll'>
<img src="mypicture.jpg" width="100" height="100" class="floated" />
<img src="mypicture.jpg" width="100" height="100" class="floated" />
<img src="mypicture.jpg" width="100" height="100" class="floated" />
<img src="mypicture.jpg" width="100" height="100" class="floated" />
<!-- we clear our floats using the following div, check out the CSS for it-->
<div class="clearfloat"></div>
</div>
和css:
.clearfloat {
clear:both; height:0px;
line-height:0px; visibility: hidden;
}
这都在代码下载文件夹中。不确定我是否可以在此处输入直接链接,但很容易找到它。希望它可以帮到某人。