write a code for a 3d landing page, the subject is web design company
- User
write a code for a 3d landing page, the subject is web design company
- Assistant
Below is a single-file “drop-in” example of a 3-D landing page for a fictitious web-design agency called “PixelForge”.
It uses:• HTML5 & CSS3 (flexbox, glass-morphism, responsive)
• Three.js (for the 3-D hero scene) – pulled from a CDN
• A touch of vanilla JavaScript for interactionCopy everything into an
index.htmlfile, open it in any modern browser, and you’re golden. 🚀<!-- ========================================================= PixelForge – 3-D Landing Page (single-file demo) ========================================================= --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>PixelForge – Creative Web Design Studio</title> <!-- Google Font --> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap" rel="stylesheet"> <!-- Icon (optional) --> <link rel="icon" href="https://raw.githubusercontent.com/twitter/twemoji/master/assets/72x72/1f4bb.png"> <style> /* ===== Reset & Base */ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; color: #f5f5f5; background: radial-gradient(circle at top, #141628 0%, #0e0f1a 100%); overflow-x: hidden; } a { text-decoration: none; color: inherit; } /* ===== Hero Section */ header { position: relative; height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; } #three-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; } .hero-content { position: relative; z-index: 2; padding: 2rem; backdrop-filter: blur(10px); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; } .hero-content h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 600; letter-spacing: 0.03em; margin-bottom: 1rem; text-shadow: 0 4px 12px rgba(0,0,0,0.5); } .hero-content p { font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6; max-width: 650px; margin: 0 auto 2rem; opacity: .9; } .cta-btn { display: inline-block; padding: 0.85rem 2.5rem; background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); border-radius: 50px; font-size: 1rem; font-weight: 600; transition: transform .25s ease, box-shadow .25s ease; box-shadow: 0 4px 18px rgba(255,75,43,.45); } .cta-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 28px rgba(255,75,43,.55); } /* ===== Services Section */ section.services { padding: 6rem 1.5rem 7rem; background: #11121d; text-align: center; } section.services h2 { font-size: 2.5rem; margin-bottom: 4rem; } .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; } .card { background: #1b1d2d; padding: 2.5rem 2rem; border-radius: 18px; border: 1px solid rgba(255,255,255,.05); box-shadow: 0 10px 25px rgba(0,0,0,.3); transition: transform .4s cubic-bezier(.25,.75,.5,1.25); } .card:hover { transform: translateY(-15px) rotateX(6deg) rotateY(-3deg); } .card img { height: 64px; margin-bottom: 1.5rem; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); } .card h3 { margin-bottom: .75rem; font-size: 1.4rem; } .card p { font-size: .95rem; opacity: .85; line-height: 1.55; } /* ===== Footer */ footer { padding: 3rem 1rem 4rem; background: #0e0f1a; text-align: center; font-size: .9rem; opacity: .6; } </style> </head> <body> <!-- ================= Hero (3-D Canvas + Overlay Content) --> <header> <canvas id="three-canvas"></canvas> <div class="hero-content"> <h1>PixelForge</h1> <p>Crafting immersive, blazing-fast websites that turn visitors into fans. We blend code + creativity to forge digital experiences in 3-D ✨</p> <a class="cta-btn" href="#contact">Get a Free Quote</a> </div> </header> <!-- ================= Simple Services Section --> <section class="services" id="services"> <h2>Our Expertise</h2> <div class="cards"> <div class="card"> <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f4bb.png" alt=""> <h3>Custom Websites</h3> <p>From concept to launch. Fully responsive, SEO-ready sites built for speed and scale.</p> </div> <div class="card"> <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f527.png" alt=""> <h3>Web Apps</h3> <p>Progressive, data-driven web applications engineered with React, Vue, or Svelte.</p> </div> <div class="card"> <img src="https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/2728.png" alt=""> <h3>UI / UX Design</h3> <p>Research-backed interfaces, delightful micro-interactions, frictionless user flows.</p> </div> </div> </section> <!-- ================= Footer --> <footer> © 2024 PixelForge Studio. All rights reserved. </footer> <!-- ================= Scripts --> <!-- Three.js CDN --> <script src="https://unpkg.com/three@0.155.0/build/three.min.js"></script> <script> /* ------------------- THREE.JS HERO SCENE ------------------- */ const canvas = document.getElementById('three-canvas'); const scene = new THREE.Scene(); /* Camera */ const camera = new THREE.PerspectiveCamera( 65, // fov window.innerWidth / window.innerHeight, 0.1, 100 ); camera.position.set(0, 1.4, 4); /* Renderer */ const renderer = new THREE.WebGLRenderer({ canvas, alpha: true, antialias: true }); renderer.setSize(window.innerWidth, window.innerHeight); renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); /* Lights */ const hemiLight = new THREE.HemisphereLight(0xffeeb1, 0x080820, 1.2); // nice soft light scene.add(hemiLight); const spotLight = new THREE.SpotLight(0xff4b2b, 1.5, 15, Math.PI / 6, 0.2, 2); spotLight.position.set(5, 7, 2); scene.add(spotLight); /* 3-D Objects (floating branded cubes) */ const group = new THREE.Group(); scene.add(group); const loader = new THREE.TextureLoader(); const textures = [ 'https://raw.githubusercontent.com/encharm/Font-Awesome-SVG-PNG/master/black/png/128/code.png', 'https://raw.githubusercontent.com/encharm/Font-Awesome-SVG-PNG/master/black/png/128/paint-brush.png', 'https://raw.githubusercontent.com/encharm/Font-Awesome-SVG-PNG/master/black/png/128/line-chart.png' ].map(url => loader.load(url)); const geometry = new THREE.BoxGeometry(1, 1, 1); for (let i = 0; i < 3; i++) { const material = [ new THREE.MeshStandardMaterial({ map: textures[i] }), new THREE.MeshStandardMaterial({ color: 0x111111 }), new THREE.MeshStandardMaterial({ color: 0x111111 }), new THREE.MeshStandardMaterial({ color: 0x111111 }), new THREE.MeshStandardMaterial({ color: 0x111111 }), new THREE.MeshStandardMaterial({ color: 0x111111 }) ]; const cube = new THREE.Mesh(geometry, material); cube.position.set((i-1)*2.6, 0, 0); group.add(cube); } /* Animation */ const clock = new THREE.Clock(); function animate() { requestAnimationFrame(animate); const t = clock.getElapsedTime(); group.children.forEach((cube, idx) => { cube.rotation.x = t*0.5 + idx; cube.rotation.y = t*0.6 + idx; }); renderer.render(scene, camera); } animate(); /* Responsive */ window.addEventListener('resize', () => { const w = window.innerWidth; const h = window.innerHeight; camera.aspect = w / h; camera.updateProjectionMatrix(); renderer.setSize(w, h); renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); }); /* Subtle parallax / camera drift */ let targetX = 0, targetY = 0; document.addEventListener('mousemove', (e) => { // Normalized coordinates -0.5 to 0.5 targetX = (e.clientX / window.innerWidth) - 0.5; targetY = (e.clientY / window.innerHeight) - 0.5; }); const smoothCamera = () => { camera.position.x += (targetX*2 - camera.position.x) * 0.05; camera.position.y += (-targetY*2 - camera.position.y) * 0.05; requestAnimationFrame(smoothCamera); }; smoothCamera(); /* ---------------- END THREE.JS ---------------- */ </script> </body> </html>What you get 🎉 • A full-screen hero with floating 3-D cubes that lightly track the mouse (parallax)
• A glass-morphic overlay holding the brand message and CTA
• A services section with 3-D hover cards (CSS perspective)
• Clean, responsive design with no build step—just open in browser.Feel free to swap logos, tweak colors, add contact forms, or split CSS/JS into separate files for production. Happy forging! 🛠️
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.