<style type="text/css">
@media screen and (min-width: 800px) {
.lianglan , .lianglanwenxin {
width: 49%;
height: auto;
margin-bottom: 12px;
float: left;
display: inline;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
}
</style>
<div class="lianglan">
<header class="page-header"><h3 class="archive-title">测心网心理测试</h3></header>
<?php
$args=array(
'cat' => 1,
'posts_per_page' => 10,
);
query_posts($args);
if(have_posts()) : while (have_posts()) : the_post();
?>
<li><a title="<?php the_title();?>"href="<?php the_permalink();?>"><?php the_title();?></a></li>
<?php endwhile; endif; wp_reset_query(); ?>
</div>
@media screen and (min-width: 800px) {
.lianglan , .lianglanwenxin {
width: 49%;
height: auto;
margin-bottom: 12px;
float: left;
display: inline;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
}
</style>
<div class="lianglan">
<header class="page-header"><h3 class="archive-title">测心网心理测试</h3></header>
<?php
$args=array(
'cat' => 1,
'posts_per_page' => 10,
);
query_posts($args);
if(have_posts()) : while (have_posts()) : the_post();
?>
<li><a title="<?php the_title();?>"href="<?php the_permalink();?>"><?php the_title();?></a></li>
<?php endwhile; endif; wp_reset_query(); ?>
</div>
上述代码已经包含css
‘cat’ => 1, 1为分类目录
‘posts_per_page’ => 10, 10为文章数量
打赏作者,期待美好
打赏鼓励作者,为网友提供更多更好的测试,也许一瓶水就够了。