【发布时间】:2015-07-24 06:34:19
【问题描述】:
我在互联网上进行了彻底搜索,但无济于事。目前我有 left-author 和 right-author 类的以下文本
#wrapper-author {
margin: 0 auto;
padding: 15px;
overflow: auto;
}
.left-author {
width: 50%;
vertical-align: top;
float: left;
}
.right-author {
width: 50%;
vertical-align: top;
float: right;
}
这用于媒体查询。除了left-author 和right-author 之外的每个查询都可以。
@media screen and (max-width: 380px) {
.left-author .right-author {
float: none;
width: 100%;
vertical-align: initial;
}
.widget_highlighted_posts .single-article {
float: none;
margin-right: 0;
max-width: 100%;
}
}
有人知道我做错了什么吗?这是 HTML....
<div id="wrapper-author">
<div class="left-author clearfix">
<h4>I guess you want to know who <?php the_author(); ?> is.</h4>
<span style="font-family: sofia-pro; font-size: 20px;"><?php the_author_meta( 'description' ); ?></span><?php
$count_posts = wp_count_posts();
$published_posts = $count_posts->publish;
?>
</div>
<div class="right-author clearfix">
<?php userphoto_the_author_photo() ?>
<div class="social-links">
<ul>
<li style="font-family: aw-conqueror-carved-one;">Follow <?php the_author_meta( first_name ); ?> on</li>
<?php $facebook = get_the_author_meta('facebook'); if ($facebook) { ?><li><a href="<?php the_author_meta('facebook'); ?>" target="_blank"><i class="fa fa-facebook"></i></a></li><?php } ?>
<?php $twitter = get_the_author_meta('twitter'); if ($twitter) { ?><li><a href="http://twitter.com/<?php the_author_meta('twitter'); ?>" target="_blank"><i class="fa fa-twitter"></i></a></li><?php } ?>
<?php $googleplus = get_the_author_meta('googleplus'); if ($googleplus) { ?><li><a href="<?php the_author_meta('googleplus'); ?>" target="_blank"><i class="fa fa-google-plus"></i></a></li><?php } ?>
<?php $instagram = get_the_author_meta('instagram'); if ($instagram) { ?><li><a href="<?php the_author_meta('instagram'); ?>" target="_blank"><i class="fa fa-instagram"></i></a></li><?php } ?>
<?php $pinterest = get_the_author_meta('pinterest'); if ($pinterest) { ?><li><a href="<?php the_author_meta('pinterest'); ?>" target="_blank"><i class="fa fa-pinterest"></i></a></li><?php } ?>
<?php $email = get_the_author_email(); if ($email) { ?><a href="mailto:<?php the_author_email(); ?>"><i class="fa fa-envelope"></i></a></li><?php } ?>
<li><a href="http://maphappy.org/author/<?php the_author_meta( 'user_login' ); ?>/feed/"><i class="fa fa-rss"></i></a></li>
</ul></div>
</div>
</div>
【问题讨论】:
-
任何 HTML 与该 CSS 一起使用?
-
我刚刚添加了它——很抱歉被否决了,我是 Stack Exchange 的新手!
标签: html css responsive-design media-queries