I want my elements to be in the middle of the screen and arranged vertically when on the mobile phone, but when switching to the tablet, the screen I hope to present is two elements in a row, presented from left to right!
Attached is the schematic diagram, but I'm stuck and don't know how to implement such a layout.
ul {
display: flex;
flex-direction: column;
align-items: center;
}
@media (min-width: 768px) {
ul {
flex-direction: row;
}
}
<ul>
<li>title</li>
<li>title</li>
<li>title</li>
<li>title</li>
<li>title</li>
<li>title</li>
<li>title</li>
</ul>