js实现html代码中无用css过滤去除工具代码
代码语言:html
所属分类:其他
代码描述:js实现html代码中无用css过滤去除工具代码
代码标签: js html 代码 无用 css 过滤 去除 工具 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>HTML CSS 优化器 - 一键清理无用样式</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0f172a;
--surface: #1e293b;
--border: #334155;
--text: #e2e8f0;
--muted: #94a3b8;
--primary: #3b82f6;
--success: #10b981;
--danger: #ef4444;
--mono: 'Cascadia Code', 'Fira Code', Consolas, Monaco, monospace;
}
body {
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1600px;
margin: 0 auto;
}
header {
text-align: center;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 2px solid var(--border);
}
h1 {
font-size: clamp(24px, 5vw, 32px);
margin-bottom: 10px;
background: linear-gradient(135deg, #3b82f6, #8b5cf6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.subtitle {
color: var(--muted);
font-size: 14px;
}
.layout {
display: grid;
gap: 20px;
grid-template-columns: 1fr;
}
@media (min-width: 1200px) {
.layout {
grid-template-columns: 1fr 1fr;
}
}
.panel {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.panel-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
background: rgba(59, 130, 246, 0.1);
border-bottom: 1px solid var(--border);
}
.panel-title {
font-weight: 600;
font-size: 14px;
display: flex;
align-items: center;
gap: 8px;
}
.badge {
display: inline-block;
padding: 3px 10px;
border-radius: 12px;
font-size: 11px;
font-weight: 600;
background: var(--success);
color: #000;
}
.badge.info {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0