画像の右側にナビゲーションメニューを配置しようとしていますが、その位置にテキストを配置することができましたが、リストを中央に配置する方法がわかりません私がjustify content: center;
を使用していた場合、私のようなものです。彼らは一直線になり、左にマッチします。フレックスボックス列を使用してリストアイテムを整列する
.landing {
background-image: url(http://adwallpapers.xyz/uploads/posts/72363-blonde-girl-blur-photo-4k-ultra-hd-wallpaper__celebrity.jpg);
margin-left: 40px;
margin-right: 40px;
height: calc(100vh - 0px);
background-size: cover;
background-position: center center;
}
ul {
display: flex;
flex-direction: column;
padding: 0;
align-items: flex-end;
}
li {
list-style: none;
color: white;
font-size: 25px;
position: relative;
top: 400px;
right: 50px;
}
<div class="landing">
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</div>
https://jsfiddle.net/oanja0xL/
正確に何を達成しようとしていますか?弾丸のポイントは、画像の中央まで並んでいるはずですか? –
このケースでは、おそらくFlexboxが最適なソリューションではありません。これを試してください:https://jsfiddle.net/oanja0xL/1/ –