<p><p> <style> * { background: #998235; } p { position: fixed; inset: 25% 50%; margin: 0; rotate: 45deg; width: 140px; height: 70px; background: #FCBE5C; transform-origin: 0 0; } p + p { width: 70px; height: 140px; background: #0B2429; } </style>
<p><p> <style> * { background: #998235; } p { position: fixed; inset: 25% 50%; margin: 0; rotate: 45deg; width: 140px; height: 70px; background: #FCBE5C; transform-origin: 0 0; } p + p { width: 70px; height: 140px; background: #0B2429; } </style>