@charset "UTF-8"; /* Theme Name: 上海能辉科技定制前端 Theme URI: https://www.nhet.energy/ Author: 上海能辉科技 Description: 上海能辉科技,基于 WordPress 定制的专用前端主题(已修复安全问题版本) Version: 1.5.0 */ /* CSS文件已通过functions.php中的wp_enqueue_style正确加载,移除@import以提升性能 */ /* 字体声明 - 优先使用主题文件夹中的字体 */ /* 你可以在这里写一些自定义的全局CSS样式 */ * { margin:0; padding:0; font-family: "Space Grotesk", "Inter", "JetBrains Mono", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif; box-sizing: border-box; } ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(19, 236, 164, 0.2); border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: rgba(19, 236, 164, 0.4); } .hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; } .hide-scrollbar::-webkit-scrollbar { display: none; } /* 懒加载图 */ /* 1. 图片初始状态:透明 */ .lazy-target { opacity: 0; transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1); /* 平滑淡入 */ will-change: opacity; } /* 2. 加载完成状态:不透明 (由 JS 添加 .loaded 类) */ .lazy-target.loaded { opacity: 1; } /* 3. 骨架屏容器:灰色背景 */ .skeleton-wrapper { background-color: #13eca4; /* Tailwind gray-200 */ position: relative; overflow: hidden; /* 确保容器有高度,否则图片没加载时高度为0 */ min-height: 100px; } .dark .skeleton-wrapper { background-color: #374151; /* Tailwind gray-700 */ } /* 4. 骨架屏呼吸动画 */ .skeleton-pulse { animation: pulse-bg 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; } @keyframes pulse-bg { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } table{ width: 100%!important; max-width: 100%!important; } /* 防止横向滚动条 */ html, body { /* overflow-x: hidden; */ overflow: initial; max-width: 100%; } body { background: #f7f7f7; background-repeat: no-repeat; background-attachment: fixed; background-position: 50% 50%; padding-top: 80px; } .page-full-width{ max-width: 100%; width: 100%; height: auto; margin-top: -5rem; background: #fff; } .page-full-width .row { margin-left: 0; margin-right: 0; } h1, h2, h3, h4, h5, h6 { font-weight: bold; color: #333; margin-bottom: 1rem; transition: all 0.3s ease; } h2{ font-size: 20px; } strong, b { font-weight: bold; color: #2c3e50; transition: all 0.3s ease; } .tinytyper { font-size:3rem; margin-top:10px; text-align:center; } #footer { font-size: 16px; display: flex; justify-content: center; padding: 10px; } .article-c, .box-b { width: 70%; text-align: center; padding: 20px; height: auto; margin: 0 auto; } .box-b { text-align: center; margin-bottom: 10px; } .box-c { background: white; border-color: #EEEEEE; box-shadow: 0 0 10px 0 rgb(0 0 0 / 6%); margin: 0 auto; border: 1px solid #eee; border-radius: 0 0 10px 10px; padding: 20px; } /* 导航菜单样式 */ .main-nav { position: sticky; top: 0; left: 0; right: 0; height: 80px; z-index: 1000; transition: transform 0.3s ease; background-color: #fff;; } .nav-container { max-width: 1320px; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; align-items: center; justify-content: space-between; } .nav-logo { display: flex; align-items: center; height: 100%; /* padding: 10px; */ /* border-radius: 0 0 10px 10px; */ } .nav-logo a { display: flex; align-items: flex-start; text-decoration: none; } .nav-logo img { height: 30px; width: auto; } .nav-logo span { font-size: 1.2rem; font-weight: 500; color: #333; margin-left: 10px; } .nav-menu { height: 100%; } .menu-items { height: 100%; display: flex; align-items: center; margin: 0; padding: 0; list-style: none; } .menu-items li { margin: 0 15px; height: 100%; display: flex; align-items: center; position: relative; } .menu-items li a { color: #333; text-decoration: none; font-size: 1rem; font-weight: 500; padding: 8px 0; border-radius: 4px; transition: all 0.3s ease; } .menu-items li a:hover { background: rgba(0, 0, 0, 0.05); color: #000; } /* 下拉菜单样式 */ .menu-items li.menu-item-has-children > a { position: relative; } .menu-items li.menu-item-has-children > a .dropdown-arrow { font-size: 0.7rem; margin-left: 8px; padding: 10px 0 10px 20px; transition: transform 0.3s ease; display: inline-block; color: inherit; } .menu-items li.menu-item-has-children:hover > a .dropdown-arrow { transform: rotate(180deg); } .sub-menu { position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); border-radius: 8px; padding: 8px 0; margin: 0; list-style: none; opacity: 0; visibility: hidden; transform: translateY(-15px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000; border: 1px solid rgba(0, 0, 0, 0.08); } .menu-items li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); } .sub-menu li { width: 100%; margin: 0; height: auto; display: block; position: relative; } .sub-menu li a { display: block; padding: 12px 20px; color: #333 !important; font-size: 0.9rem; border-radius: 0; transition: all 0.3s ease; white-space: nowrap; border-bottom: 1px solid rgba(0, 0, 0, 0.05); } .sub-menu li:last-child a { border-bottom: none; } .sub-menu li a:hover { background: #f8f9fa; color: #007cba !important; padding-left: 25px; } /* 三级菜单样式 */ .sub-menu .menu-item-has-children { position: relative; } .sub-menu .menu-item-has-children > a .dropdown-arrow { float: right; transform: rotate(-90deg); } .sub-menu .menu-item-has-children:hover > a .dropdown-arrow { transform: rotate(90deg); } /* 多级下拉菜单 */ .sub-menu .sub-menu { top: 0; left: 100%; margin-left: 2px; margin-top: -8px; } .sub-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); } /* 为有子菜单的项目添加箭头 */ .sub-menu li.menu-item-has-children > a::after { content: '▶'; float: right; font-size: 0.7rem; color: #999; transition: color 0.3s ease; } .sub-menu li.menu-item-has-children:hover > a::after { color: #007cba; } .sub-menu .menu-item-has-children:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); } .menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; } .menu-toggle span { display: block; width: 25px; height: 2px; background: #333; margin: 5px 0; transition: all 0.3s ease; } .main-nav.scrolled .menu-toggle span { background: #888; } /* 响应式设计 */ @media screen and (max-width: 768px) { .menu-toggle { display: block; } .nav-menu { position: fixed; top: 80px; left: 0; right: 0; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 20px; transform: translateY(-100%); opacity: 0; visibility: hidden; transition: all 0.3s ease; max-height: calc(100vh - 80px); overflow-y: auto; } .nav-menu.active { transform: translateY(0); opacity: 1; visibility: visible; height: auto; } .menu-items { flex-direction: column; align-items: flex-start; height: auto; } .menu-items li { width: 100%; margin: 0; height: auto; display: block; } .menu-items li a { display: block; padding: 15px 0; color: #333 !important; border-bottom: 1px solid #eee; position: relative; } /* 移动端下拉箭头 */ .menu-items li.menu-item-has-children > a .dropdown-arrow { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 0.8rem; float: none; } /* 移动端下拉菜单样式 */ .sub-menu { position: static; background: #f8f9fa; box-shadow: none; border-radius: 0; padding: 0; opacity: 1; visibility: visible; transform: none; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; border: none; min-width: auto; } .menu-items li.menu-item-has-children.mobile-open > .sub-menu { max-height: 500px; } .sub-menu li { border-bottom: 1px solid #e0e0e0; } .sub-menu li:last-child { border-bottom: none; } .sub-menu li a { padding: 12px 0 12px 20px; border-bottom: none; font-size: 0.9rem; background: #f8f9fa; color: #333 !important; } .sub-menu .sub-menu li a { padding-left: 40px; background: #f0f0f0; } .sub-menu .sub-menu { margin: 0; left: 0; top: 0; } .sub-menu .sub-menu .sub-menu li a { padding-left: 60px; background: #e8e8e8; } .menu-items li.menu-item-has-children > a .dropdown-arrow { /* transform: rotate(0deg); */ } .menu-items li.menu-item-has-children.mobile-open > a .dropdown-arrow { transform: rotate(180deg); } .sub-menu .menu-item-has-children > a .dropdown-arrow { transform: rotate(0deg); } .sub-menu .menu-item-has-children.mobile-open > a .dropdown-arrow { transform: rotate(180deg); } /* 移动端子菜单箭头 */ .sub-menu li.menu-item-has-children > a::after { position: absolute; right: 0; top: 50%; transform: translateY(-50%); float: none; } /* Fluent Form 移动端宽度调整 */ .fluentform.ff-default.fluentform_wrapper_3.ffs_default_wrap { width: 80% !important; margin-left: auto; margin-right: auto; } form.fluent_form_3 .ff-btn-submit:not(.ff_btn_no_style) { width: 100% !important; } form.fluent_form_1 .ff-btn-submit:not(.ff_btn_no_style){ width: 100%; } } /* 文章卡片网格布局 */ .content-area { max-width: 1200px; margin: 0 auto; padding: 20px; } .posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 40px; } /* 文章卡片样式 */ .post-card { background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; } .post-card:hover { transform: translateY(-5px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; } .post-content { padding: 20px; } .post-title { margin: 0 0 15px 0; font-size: 1.25rem; line-height: 1.4; } .post-title a { color: #333; text-decoration: none; transition: color 0.2s ease; } .post-title a:hover { color: #007bff; transition: all 0.3s ease; } .post-meta { font-size: 0.875rem; color: #666; margin-bottom: 15px; display: flex; gap: 15px; } .post-date, .post-category { display: flex; align-items: center; } .post-category a { color: #666; text-decoration: none; } .post-category a:hover { color: #007bff; transition: all 0.3s ease; } .post-excerpt { color: #666; font-size: 0.95rem; line-height: 1.6; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; } /* 无文章提示 */ .no-posts { text-align: center; padding: 40px; background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); } .no-posts h2 { color: #666; font-size: 1.5rem; margin: 0; } .accordion-body{ color: #000000!important; }