代码编辑器
实时编写和预览您的 HTML 和 CSS 代码
编写代码
→
实时预览
→
导出图片
样式预设
选择你喜欢的导出样式
HTML 编辑器
HTML
<div class="card"> <div class="card-header"> <h2 class="title">Welcome to Code-to-PNG!</h2> <p class="subtitle">Create beautiful images from your code</p> </div> <div class="card-body"> <div class="feature"> <div class="feature-icon">🎨</div> <h3>Style Presets</h3> <p>Choose from Default, Card, macOS, or Terminal styles</p> </div> <div class="feature"> <div class="feature-icon">📱</div> <h3>Live WYSIWYG</h3> <p>See exactly what your export will look like</p> </div> <div class="feature"> <div class="feature-icon">⚡</div> <h3>Quick Export</h3> <p>One-click export buttons for each section</p> </div> </div> <div class="card-footer"> <button class="btn-primary">Get Started</button> <button class="btn-secondary">Learn More</button> </div> </div>
CSS 编辑器
CSS
.card { max-width: 600px; margin: 20px auto; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); color: white; overflow: hidden; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } .card-header { padding: 40px 40px 20px; text-align: center; } .title { font-size: 2.5rem; font-weight: 700; margin: 0 0 10px 0; background: linear-gradient(45deg, #fff, #e0e7ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .subtitle { font-size: 1.2rem; opacity: 0.9; margin: 0; font-weight: 300; } .card-body { padding: 20px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; } .feature { text-align: center; } .feature-icon { font-size: 3rem; margin-bottom: 15px; display: block; } .feature h3 { font-size: 1.3rem; margin: 0 0 10px 0; font-weight: 600; } .feature p { font-size: 0.95rem; opacity: 0.8; margin: 0; line-height: 1.5; } .card-footer { padding: 30px 40px 40px; display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; } .btn-primary, .btn-secondary { padding: 12px 24px; border-radius: 25px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; border: 2px solid transparent; text-decoration: none; display: inline-block; } .btn-primary { background: rgba(255,255,255,0.2); color: white; border-color: rgba(255,255,255,0.3); } .btn-primary:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); } .btn-secondary { background: transparent; color: white; border-color: rgba(255,255,255,0.5); } .btn-secondary:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); } @media (max-width: 640px) { .card { margin: 10px; border-radius: 15px; } .card-header { padding: 30px 20px 15px; } .title { font-size: 2rem; } .card-body { padding: 15px 20px; gap: 20px; } .card-footer { padding: 20px; flex-direction: column; } }
实时预览
Preview
Welcome to Code-to-PNG!
Create beautiful images from your code
🎨
Style Presets
Choose from Default, Card, macOS, or Terminal styles
📱
Live WYSIWYG
See exactly what your export will look like
⚡
Quick Export
One-click export buttons for each section
