我正在尝试使用响应式网页设计,特别是在打击576px的屏幕大小时将图像集中在列容器内。我已经尝试了我在其他地方看到的这种说法:使用媒体查询引导中心列引导程序
@media(max-width: 576px)
{
.first-pic-container {
float: none;
margin: 0 auto;
}
但是它没有太大的作用。我也尝试使用Bootstrap的offset
类,但是这也没有做任何事。
下面是相关的HTML:
<div class="col-sm-4 first-pic-container">
<img class="first-step" src="step1image.png" alt="firstpic">
<div class= "row">
<div class="col-sm-12 col-md-12 col-lg-10 first-p-container">
<p class="step-one-p"> Enter the classes you are looking to take for next semester! </p>
</div>
</div>
</div>
和Visual参考codepen。我加入了firstpic
和first-pic-container
周围的边框其中我试图中心:https://codepen.io/gkunthara/pen/VWdrYj
好知道。谢谢! – brownmamba