<meta charset="UTF-8"> <meta cOntent="width=device-width, initial-scale=1.0" name="viewport"> <meta cOntent="ie=edge" http-equiv="X-UA-Compatible"> <title>Document</title> <style> .a { width: 500px; height: 500px; background: #448899; overflow: hidden; position: relative; } <pre><code>.b { width: 100%; height: 400px; background: #892989; position: absolute; } .c { height: 350px; display: flex; align-items: center; background: turquoise; position: absolute; } .c>li { flex-shrink: 0; width: 200px; height: 300px; margin: 0 10px; background: chocolate; } </code></pre> </style>