JSFiddle - React, Tailwind, and code Playground
by dledle2
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Text Logo Generator</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
/* Custom scrollbar for pre elements (optional, for aesthetics) */
pre::-webkit-scrollbar {
width: 8px;
height: 8px;
}
pre::-webkit-scrollbar-track {
background: #2d3748; /* bg-gray-700 */
}
pre::-webkit-scrollbar-thumb {
background: #4a5568; /* bg-gray-600 */
border-radius: 4px;
}
pre::-webkit-scrollbar-thumb:hover {
background: #718096; /* bg-gray-500 */
}
/* Ensures transformations originate from the center of the element */
.logo-preview {
transform-origin: center center;
}
/* Basic perspective context for child elements, applied on preview-container */
.perspective-parent {
perspective: 800px; /* Default perspective, can be overridden by logo-specific perspective */
}
</style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen p-4 sm:p-8 font-sans">
<div class="container mx-auto">
<header class="text-center mb-8">
<h1 class="text-4xl sm:text-5xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-purple-400 via-pink-500 to-red-500">
3D Text Logo Generator
</h1>
<p class="text-gray-400 mt-2">Create and customize 3D-like text logos with various effects. Click "Generate" multiple times for new sets!</p>
</header>
<main>
<section id="controls" class="bg-gray-800 p-6 rounded-lg shadow-xl mb-8">
<h2 class="text-2xl font-semibold mb-4 text-pink-400">Controls</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
...