I have an issue with the space-evenly
value for justify-content
on Chrome mobile (it works fine on Desktop and on Firefox mobile).
I managed to produce a minimal example: Example
I have a flex container in a row direction and I want the elements to be spaced evenly, as intended when using space-evenly
. It works on desktop, but on Chrome mobile (version 59 on Android), however, the elements are aligned on the left. Here is a comparison of the two: Comparison
center
and space-around
values work as intended, however, but I really want to use space-evenly
or an equivalent (the flex-wrap: wrap
behavior is also important to me).
Here is my HTML:
<div class="container">
<div class="element"></div>
<div class="element"></div>
<div class="element"></div>
</div>
And here is my CSS:
.container {
display: flex;
flex-direction: row;
justify-content: space-evenly;
flex-wrap: wrap;
background: lightgrey;
}
.element {
margin: 8px;
width: 42px;
height: 42px;
background: black;
}
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…