STYLE / 112

Retro interface

レトロな画面構成
等幅文字、平面的なボタン、強い枠線で画面を組みます。

実際のHTML・CSSで描かれた見本です。

ラボで詳しく試す ↗

ひとつ試すなら

どこが変わるかを観察して、似た表現と見比べてみよう。

こんなときに

昔のコンピューターを連想させる演出。

仕組みと使い方

雰囲気を再現しながら、現在の操作性も確認します。

レトロretroピクセルコンピューター
実装コードを見る
<style>
.sample{width:100%;height:100%;min-height:190px;display:grid;place-items:center;position:relative;overflow:hidden;box-sizing:border-box;font-family:Arial,'Hiragino Kaku Gothic ProN',Meiryo,sans-serif;color:#20211d;background:#f1f0e9;padding:22px}.sample *{box-sizing:border-box}.sample button,.sample input,.sample summary{font:inherit}.sample button,.sample summary,.sample label{touch-action:manipulation}.sample :focus-visible{outline:3px solid #6050bf;outline-offset:5px}.sample small{font-size:10px;line-height:1.5}.sample .editable{margin:0}.sample svg{max-width:100%;height:auto}
.sample{background:#b5a5d6}.sample .window{width:213px;border:2px solid #222;background:#e4e2da;box-shadow:5px 5px 0 #222;font-family:monospace}.sample header{background:#222;color:#fff;display:flex;justify-content:space-between;padding:6px;font-size:10px}.sample .window>div{padding:17px}.sample p{font:11px monospace;margin:0 0 14px}.sample button{border:2px solid #222;background:#d5d7cb;box-shadow:2px 2px 0 #222;padding:4px 22px;font:11px monospace;cursor:pointer}.sample button:active{box-shadow:none;transform:translate(2px,2px)}
</style>
<div class="sample">
<div class="window"><header><span>GOOD.EXE</span><b>×</b></header><div><p>HELLO, CREATOR_</p><button type="button">OK</button></div></div>
</div>