iPhone 18のHTML/CSSコンセプトデザイン作成

仮想iPhone18を作ってhtmlを出して
Homi

仮想iPhone18のコンセプトに基づいた、モダンで未来的なデザインのHTMLとCSSコードを作成しました。以下のコードをコピーして、ブラウザで表示してみてください。

HTML
<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>iPhone 18 Concept</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #0d0d0d;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            color: #fff;
        }

        /* iPhone 18 Body */
        .iphone {
            width: 380px;
            height: 780px;
            background: #1c1c1e;
            border-radius: 55px;
            box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.2);
            position: relative;
            padding: 14px;
            box-sizing: border-box;
            border: 2px solid #333;
        }

        /* Screen */
        .screen {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #2c3e50, #000000);
            border-radius: 45px;
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 40px 20px 20px 20px;
            box-sizing: border-box;
        }

        /* Under-display camera indicator (Minimalist dot) */
        .camera-dot {
            position: absolute;
            top: 15px;
            left: 50%;
            transform: translateX(-50%);
            width: 8px;
            height: 8px;
            background: #000;
            border-radius: 50%;
            z-index: 10;
        }

        /* Status Bar */
        .status-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            font-weight: 600;
        }

        /* Main UI */
        .content {
            text-align: center;
            margin: auto;
        }

        .time {
            font-size: 72px;
            font-weight: 200;
            margin: 0;
            letter-spacing: -2px;
        }

        .date {
            font-size: 18px;
            color: #aaa;
            margin-top: 5px;
        }

        /* Holographic AI Widget */
        .widget {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 15px;
            margin-bottom: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            text-align: left;
        }

        .widget-title {
            font-size: 12px;
            color: #00e5ff;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 5px;
        }

        .widget-text {
            font-size: 15px;
            margin: 0;
        }

        /* Home Indicator */
        .home-indicator {
            width: 130px;
            height: 5px;
            background: #fff;
            border-radius: 10px;
            margin: 0 auto;
            opacity: 0.6;
        }
    </style>
</head>
<body>

    <div class="iphone">
        <div class="screen">
            <div class="camera-dot"></div>

            <div class="status-bar">
                <span>09:41</span>
                <span>5G 🔋</span>
            </div>

            <div class="content">
                <h1 class="time">09:41</h1>
                <p class="date">9月18日 金曜日</p>
            </div>

            <div class="widget">
                <div class="widget-title">AI Neural Assistant</div>
                <p class="widget-text">ホログラフィック投影モードが準備完了しました。</p>
            </div>

            <div class="home-indicator"></div>
        </div>
    </div>

</body>
</html>

特徴

  • フルベゼルレスデザイン: ノッチやダイナミックアイランドを廃止し、画面下部埋め込み型カメラを想定したミニマルなドットを配置。
  • 次世代UI: 透明感のあるグラスモーフィズム(ガラス風)ウィジェットとAIアシスタント表示。
  • 丸みを帯びた未来的な筐体: iPhoneの伝統的なフォルムをさらに洗練させたデザイン。
画面にインタラクティブなアプリコーンや操作機能を追加して
Homi

インタラクティブなアプリのアイコンや、タップして操作できる機能(アプリの起動・閉じる動作など)を追加した、よりリッチなiPhone 18のコードにアップデートしました!

HTML
<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>iPhone 18 Interactive Concept</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #0d0d0d;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            color: #fff;
            overflow: hidden;
        }

        /* iPhone 18 Body */
        .iphone {
            width: 380px;
            height: 780px;
            background: #1c1c1e;
            border-radius: 55px;
            box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), inset 0 0 10px rgba(255, 255, 255, 0.2);
            position: relative;
            padding: 14px;
            box-sizing: border-box;
            border: 2px solid #333;
        }

        /* Screen */
        .screen {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
            border-radius: 45px;
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 40px 20px 20px 20px;
            box-sizing: border-box;
        }

        .camera-dot {
            position: absolute;
            top: 15px;
            left: 50%;
            transform: translateX(-50%);
            width: 8px;
            height: 8px;
            background: #000;
            border-radius: 50%;
            z-index: 10;
        }

        .status-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            font-weight: 600;
        }

        /* Home Screen Content */
        .home-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            flex-grow: 1;
            justify-content: center;
        }

        .time {
            font-size: 64px;
            font-weight: 200;
            margin: 0;
            letter-spacing: -2px;
        }

        .date {
            font-size: 16px;
            color: #aaa;
            margin-bottom: 30px;
        }

        /* App Grid */
        .app-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            width: 100%;
            padding: 0 10px;
            box-sizing: border-box;
        }

        .app-icon {
            width: 60px;
            height: 60px;
            border-radius: 16px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 24px;
            cursor: pointer;
            transition: transform 0.2s, filter 0.2s;
            box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        }

        .app-icon:hover {
            transform: scale(1.08);
            filter: brightness(1.1);
        }

        .app-safari { background: linear-gradient(135deg, #00c6ff, #0072ff); }
        .app-photos { background: linear-gradient(135deg, #f12711, #f5af19); }
        .app-ai { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
        .app-settings { background: linear-gradient(135deg, #7f7f7f, #3b3b3b); }

        /* Modal / App Open View */
        .app-modal {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(20, 20, 25, 0.95);
            backdrop-filter: blur(25px);
            z-index: 20;
            display: flex;
            flex-direction: column;
            padding: 50px 20px 20px 20px;
            box-sizing: border-box;
            transform: scale(0.9);
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .app-modal.active {
            transform: scale(1);
            opacity: 1;
            pointer-events: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .modal-title {
            font-size: 20px;
            font-weight: 600;
        }

        .close-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #fff;
            padding: 6px 14px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
        }

        .modal-body {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            color: #ddd;
        }

        /* Home Indicator */
        .home-indicator {
            width: 130px;
            height: 5px;
            background: #fff;
            border-radius: 10px;
            margin: 0 auto;
            opacity: 0.6;
            cursor: pointer;
        }
    </style>
</head>
<body>

    <div class="iphone">
        <div class="screen">
            <div class="camera-dot"></div>

            <div class="status-bar">
                <span>09:41</span>
                <span>5G 🔋</span>
            </div>

            <!-- Home Screen -->
            <div class="home-content">
                <h1 class="time" id="clock">09:41</h1>
                <p class="date">9月18日 金曜日</p>

                <div class="app-grid">
                    <div class="app-icon app-safari" onclick="openApp('Safari AI')">🌐</div>
                    <div class="app-icon app-photos" onclick="openApp('Holo Photos')">📸</div>
                    <div class="app-icon app-ai" onclick="openApp('Neural AI')">✨</div>
                    <div class="app-icon app-settings" onclick="openApp('Settings')">⚙️</div>
                </div>
            </div>

            <!-- App Modal Window -->
            <div class="app-modal" id="appModal">
                <div class="modal-header">
                    <span class="modal-title" id="modalTitle">App</span>
                    <button class="close-btn" onclick="closeApp()">閉じる</button>
                </div>
                <div class="modal-body">
                    <p>ここに未来的なアプリの機能が表示されます。</p>
                </div>
            </div>

            <div class="home-indicator" onclick="closeApp()"></div>
        </div>
    </div>

    <script>
        function openApp(appName) {
            document.getElementById('modalTitle').innerText = appName;
            document.getElementById('appModal').classList.add('active');
        }

        function closeApp() {
            document.getElementById('appModal').classList.remove('active');
        }

        // リアルタイム時計更新
        setInterval(() => {
            const now = new Date();
            const hours = String(now.getHours()).padStart(2, '0');
            const minutes = String(now.getMinutes()).padStart(2, '0');
            document.getElementById('clock').innerText = `${hours}:${minutes}`;
        }, 1000);
    </script>

</body>
</html>

追加されたインタラクティブ機能

  1. アプリコーンのタップ起動: アイコンをクリックすると、未来的なガラス風モーダル(画面)が滑らかに展開します。
  2. 「閉じる」ボタン & ホームバー: モーダル内の「閉じる」ボタンや下部のバーをクリックするとホーム画面に戻ります。
  3. リアルタイム時計: JavaScriptにより、実際の現在時刻が上部に反映され続けます。
Homi
テキストをコピーしました
完了
エラー