冷火凉烟·工具箱
首页
/
Web开发
/
响应式断点查看器
←
Web开发
📱
响应式断点查看器
模拟不同设备屏幕尺寸,测试响应式布局断点
☆
收藏
预设设备
📱
iPhone SE
375 × 667
📱
iPhone 12 Pro
390 × 844
📱
Pixel 5
393 × 851
📱
iPad Mini
768 × 1024
💻
iPad Pro
1024 × 1366
💻
Laptop
1366 × 768
🖥️
Desktop
1920 × 1080
自定义尺寸
宽度 (px)
高度 (px)
HTML/CSS代码
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>响应式测试</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: system-ui, -apple-system, sans-serif; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; min-height: 100vh; } .container { max-width: 1200px; margin: 0 auto; } h1 { font-size: 2.5rem; margin-bottom: 1rem; } p { font-size: 1.1rem; line-height: 1.6; margin-bottom: 2rem; } .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 2rem; } .card { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 20px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.2); } .card h3 { margin-bottom: 10px; } .info { background: rgba(255, 255, 255, 0.15); padding: 15px; border-radius: 8px; margin-top: 2rem; } @media (max-width: 768px) { h1 { font-size: 2rem; } .grid { grid-template-columns: 1fr; } } @media (max-width: 480px) { h1 { font-size: 1.5rem; } body { padding: 15px; } } </style> </head> <body> <div class="container"> <h1>🎨 响应式设计测试</h1> <p>调整窗口大小查看不同断点下的布局效果</p> <div class="grid"> <div class="card"> <h3>📱 移动端</h3> <p>< 480px:单栏布局</p> </div> <div class="card"> <h3>💻 平板</h3> <p>768px - 1024px:网格布局</p> </div> <div class="card"> <h3>🖥️ 桌面</h3> <p>> 1024px:多栏布局</p> </div> </div> <div class="info"> <strong>当前视口:</strong> <span id="viewport"></span> </div> </div> <script> function updateViewport() { document.getElementById('viewport').textContent = window.innerWidth + 'px × ' + window.innerHeight + 'px'; } updateViewport(); window.addEventListener('resize', updateViewport); </script> </body> </html>
📄 加载示例
🗑️ 清空
iPhone SE
375 × 667 px
🔄 旋转
🔃 刷新
💡
提示:
此工具使用iframe加载HTML代码,不支持加载外部URL(避免CORS问题)。 您可以直接在左侧编辑HTML/CSS代码进行测试。