简体   繁体   English

弹性图像和定位问题

[英]Flex images and positioning issue

What I'm trying to achieve, once I reduce the size of the screen and some elements starts to move to a second line, keep them organized to the left, instead of centered (based on the number of elements on that row). 我要实现的目标是,一旦减小屏幕尺寸并且某些元素开始移至第二行,请将其组织在左侧,而不是居中(根据该行上的元素数)。 This image might help 该图像可能会有所帮助 在此处输入图片说明

And this is my actual code, what I'm doing wrong? 这是我的实际代码,我做错了什么?

 #teamBoxesWrapper { position: relative; background-color: ; width: 1200px; height: auto; left: 50%; transform: translateX(-50%); -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); -ms-transform: translateX(-50%); -o-transform: translateX(-50%); display: flex; flex-flow: row wrap; justify-content: space-between; } #teamUser { width: 250px; /* 20% of the viewport width */ height: 250px; background-color: ; margin: auto; cursor: pointer; margin-bottom: 20px; position: relative; } .teamUser4 { background-image: url('../images/empleado4.jpg'); background-position: center center; background-size: cover; } 
 <div id="teamBoxesWrapper"> <div id="teamUser" class="teamUser4"> <div id="teamUserPopup4" class="teamUserDetails"> <div id="teamUserTextAligner"> <h3 class="teamUserText1">Manuel Brenes</h3> <hr class="userHr" /> <h3 class="teamUserText2">Graduado Social y <br>Derechos Laborales</h3> </div> </div> </div> </div> 

在您的代码上,尝试替换您的justify-content:居中空间;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM