我是编码新手&我有一个关于移动定位的问题。我已经添加了CSS和Div,并设置了自己,它是工作在PC视图,但在移动视图,它移动到正确的side.not在确切的步伐。
DIV类
hd矢量背景
199 Loading...
CSS
div.relative {
position: relative;
left: 850px;
bottom: 270px;
border: 3px solid #73AD21;
}
移动视图
您的帮助将不胜感激
是否可以将上一个表行与第二个单表合并。没有CSS第一代码11图像Post代码-
<div class="panel-body">
<div class="col-md-12">
<?php $the_query = new WP_Query( 'showposts=11&orderby=date&order=DESC' ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-hs-6">
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
</div>
第二张单图表编码:
hd矢量背景
199正在加载...
发布于 2018-06-17 01:15:22
在CSS中,您应该使用百分比而不是像素作为左侧和底部的值。它将以更好的方式呈现元素。但在你的情况下,我不认为这个职位是必需的。
发布于 2018-06-17 01:20:32
由于屏幕的不同,size.The元素会根据屏幕的大小进行定位,这意味着元素会根据屏幕的大小进行调整。尝试使用其他定位方法,如果问题仍然存在,则使用媒体查询使您的页面具有响应性,这可能会对您有所帮助。
发布于 2018-06-17 03:45:11
你添加了"div“,默认情况下,"div”标签是块级元素,从新行开始尝试将display: inline-block“添加到你的is中。或者使用媒体查询。
https://stackoverflow.com/questions/50889936
复制相似问题