【发布时间】:2016-11-19 22:32:34
【问题描述】:
第 2 轮:试图弄清楚为什么我的内容在屏幕尺寸低于 992 像素时看起来不错,但在屏幕尺寸结束时却不行。在较低的屏幕上一切看起来都很好,但在全屏尺寸下几乎没有任何东西在正确的位置。我有一种感觉,这是因为循环内的容器,但我不确定如何正确地将它们取出而不会将所有内容从 .col-md-1 容器中强制放入一个狭窄的列中。
<?php get_header(); ?>
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Blog</h1>
<ol class="breadcrumb">
<li><a href="#">Home</a>
</li>
<li class="active">Blog</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="col-md-1 text-center">
<p><?php the_time('l, F jS, Y'); ?></p>
</div>
<?php if ( has_post_thumbnail() ) : ?>
<div class="col-md-5">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'large', array( 'class' => 'img-responsive img-hover' ) ); ?>
</a>
</div>
<?php endif; ?>
<div class="col-md-6">
<h3>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<p>by <?php the_author_posts_link(); ?>
</p>
<p><?php the_excerpt(); ?></p>
<a class="btn btn-primary" href="<?php the_permalink(); ?>">Read More <i class="fa fa-angle-right"></i></a>
</div>
<hr>
<?php endwhile; ?>
<div class="navigation"><p><?php posts_nav_link('','« Newer Posts','Older Posts »'); ?></p></div>
</div>
<?php include 'include.php'; ?>
</div>
<?php else: ?>
<p><?php _e('Sorry, there are no posts.'); ?></p>
<?php endif; ?>
<?php get_footer(); ?>
非常感谢任何见解:)
【问题讨论】:
-
你为什么不使用引导响应实用程序类。使用纯 html 可以对其进行测试,但是所有这些变量都很麻烦
-
像这样添加一个 div:希望对你有帮助
-
您好,能否发布两种尺寸的内容截图
-
用 class= 'row' 包裹一个 div
-
请问第一轮在哪里。
标签: php html css wordpress twitter-bootstrap