js+css实现可视化json字符串格式校验错误显示与纠正建议代码
代码语言:html
所属分类:其他
代码描述:js+css实现可视化json字符串格式校验错误显示与纠正建议代码
代码标签: js css 可视化 json 字符串 格式 错误 校验 显示 纠正 建议 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>JSON数组错误定位与修复建议工具</title>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
background: #f5f7fb;
color: #1f2937;
}
.container {
max-width: 1200px;
margin: 24px auto;
padding: 0 16px;
}
.card {
background: #fff;
border-radius: 14px;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
padding: 20px;
margin-bottom: 18px;
}
h1 {
margin: 0 0 10px;
font-size: 28px;
color: #111827;
}
.desc {
color: #6b7280;
margin-bottom: 16px;
line-height: 1.6;
}
textarea {
width: 100%;
min-height: 280px;
resize: vertical;
padding: 14px;
border: 1px solid #d1d5db;
border-radius: 10px;
font-size: 14px;
line-height: 1.6;
font-family: Consolas, "Courier New", monospace;
outline: none;
transition: border-color 0.2s, box-shadow 0.2s;
background: #fcfcfd;
}
textarea:focus {
border-color: #3b82f6;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.toolbar {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 14px 0 6px;
}
button {
border: none;
border-radius: 10px;
padding: 10px 16px;
font-size: 14px;
cursor: pointer;
transition: transform 0.05s ease, opacity 0.2s ease, background 0.2s ease;
}
button:active {
transform: translateY(1px);
}
.btn-primary {
background: #2563eb;
color: #fff;
}
.btn-primary:hover {
background: #1d4ed8;
}
.btn-secondary {
background: #e5e7eb;
color: #111827;
}
.btn-se.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0