js+css实现json简历数据渲染简约简历效果代码
代码语言:html
所属分类:布局界面
代码描述:js+css实现json简历数据渲染简约简历效果代码,可通过修改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> <!-- 引入Font Awesome图标库 --> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css"> <!-- 引入Google Fonts --> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Playfair+Display:wght@400;700&display=swap" rel="stylesheet"> <style id="dynamic-styles"> /* 动态样式将通过JavaScript注入 */ </style> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Roboto', 'Microsoft YaHei', sans-serif; line-height: 1.6; background-color: #f5f5f5; color: #333; } .resume-container { max-width: 1000px; margin: 40px auto; background: #fff; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); position: relative; } .resume-header { padding: 50px; position: relative; overflow: hidden; } .resume-header::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; } .resume-name { font-size: 3rem; margin-bottom: 10px; font-weight: 700; } .resume-title { font-size: 1.5rem; margin-bottom: 20px; font-weight: 300; } .resume-contact { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; } .contact-item { display: flex; align-items: center; gap: 10px; } .contact-item i { font-size: 1.2rem; } .resume-photo { position: absolute; top: 50px; right: 50px; width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); } .resume-body { display: flex; flex-wrap: wrap; } .resume-sidebar { flex: 1; min-width: 300px; padding: 30px; } .resume-main { flex: 2; min-width: 400px; padding: 30px; border-left: 1px solid #eee; } .section { margin-bottom: 40px; } .section-title { font-size: 1.5rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid; display: inline-block; } .skill-list { list-style: none; } .skill-item { margin-bottom: 15px; } .skill-name { font-weight: 500; margin-bottom: 5px; display: flex; justify-content: space-between; } .skill-level { height: 8px; background-color: #eee; border-radius: 4px; overflow: hidden; margin-top: 5px; } .skill-level-fill { height: 100%; border-radius: 4px; } .language-list { list-style: none; } .language-item { margin-bottom: 15px; display: flex; justify-content: space-between; } .language-name { font-weight: 500; } .language-level { font-style: italic; } .interest-list { display: flex; flex-wrap: wrap; gap: 15px; list-style: none; } .interest-item { background-color: #f5f5f5; padding: 8px 15px; border-radius: 20px; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; } .experience-item, .education-item { margin-bottom: 30px; position: relative; } .experience-title, .education-degree { font-size: 1.2rem; font-weight: 500; margin-bottom: 5px; } .experience-company, .education-institution { font-weight: 500; margin-bottom: 5px; } .experience-date, .education-date { font-style: italic; margin-bottom: 10px; color: #666; } .experience-description, .education-description { margin-top: 10px; } .experience-description ul, .education-description ul { padding-left: 20px; } .experience-description li, .education-description li { margin-bottom: 5px; } .project-item { margin-bottom: 30px; } .project-title { font-size: 1.2rem; font-weight: 500; margin-bottom: 5px; } .project-tech { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 10px; } .tech-tag { background-color: #f5f5f5; padding: 3px 10px; border-radius: 15px; font-size: 0.8rem; } .project-description { margin-top: 10px; } .project-description ul { padding-left: 20px; } .project-description li { margin-bottom: 5px; } .json-editor { position: fixed; top: 20px; right: 20px; z-index: 1000; } .editor-toggle { padding: 10px 15px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; } .editor-panel { position: fixed; top: 0; right: -50%; width: 50%; height: 100vh; background: #fff; box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); padding: 20px; transition: right 0.3s ease; di.........完整代码请登录后点击上方下载按钮下载查看
网友评论0