[fix]更新导航栏,在鼠标移动上去的hover效果,删除字体加粗的效果,会导致布局错位混乱,删除LOGO副标题的字体Hover效果,保留手势

2.更新字体镜像源,从谷歌字体调整为国内镜像字体,保证国内访问的稳定性
dev-about
huyuanxiang 1 month ago
parent 1ffc0e9be6
commit 4d21ab4c19

@ -250,7 +250,7 @@ img {
.banner-title {
font-size: 3rem;
font-weight: bold;
margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
@ -434,7 +434,8 @@ img {
}
.news-title {
font-size: 42px;
font-size: 48px;
font-weight: bold;
color: #333;
letter-spacing: 2px;
}
@ -801,7 +802,7 @@ img {
}
.footer-container {
max-width: 1320px;
max-width: 1390px;
margin: 0 auto;
padding: 0 20px;
}

@ -5,7 +5,7 @@
<!-- Logo 和公司信息 -->
<div class="footer-brand">
<div class="footer-logo">
<h3 class="text-[#111318] dark:text-white text-3xl md:text-2xl leading-tight tracking-tight mb-4 bg-clip-text text-transparent bg-gradient-to-r from-gray-900 to-gray-600 dark:from-white dark:to-gray-400"> Follow NENGHUI</h3>
<h3 class="font-display text-[#111318] dark:text-white text-3xl md:text-2xl leading-tight tracking-tight mb-4 bg-clip-text text-transparent bg-gradient-to-r from-gray-900 to-gray-600 dark:from-white dark:to-gray-400"> Follow NENGHUI</h3>
<!-- <img src="https://nenghui.com/wp-content/uploads/2025/11/logo-2.png" alt="<?php bloginfo('name'); ?>" style=" height: 32px;" class="logo-img"> -->
</div>
@ -49,8 +49,9 @@
<h3 class="footer-nav-title">ABOUT US</h3>
<ul class="footer-nav-list">
<li><a href="/about-us">Company Profile</a></li>
<li><a href="/story">Brand Story</a></li>
<li><a href="/contact-us">Contact Nenghui</a></li>
<li><a href="/honor">Certifications & Accreditations</a></li>
<li><a href="/news">News</a></li>
</ul>
@ -59,8 +60,8 @@
<div class="footer-nav-column">
<h3 class="footer-nav-title">PRODUCTS & SOLUTIONS</h3>
<ul class="footer-nav-list">
<li><a href="/pros/">Products</a></li>
<li><a href="/epc-solutions">EPC & Energy Solutions</a></li>
<li><a href="/pros/">Energy Storage Systems</a></li>
<li><a href="/epc-emc">EPC&EMC/PPA Solution</a></li>
<li><a href="/microgrid">Microgrids</a></li>
</ul>
</div>
@ -71,7 +72,7 @@
</ul>
</div>
<div class="footer-nav-column">
<h3 class="footer-nav-title">SERVICE & SUPPURT</h3>
<h3 class="footer-nav-title">SERVICE & SUPPORT</h3>
<ul class="footer-nav-list">
<li><a href="/download-center/">Download Center</a></li>
<li><a href="/support/">Service</a></li>
@ -79,7 +80,6 @@
</ul>
</div>
</div>
<!-- 订阅区域 -->
<!-- <div class="footer-subscribe">
<?php echo do_shortcode('[fluentform id="3"]'); ?>
@ -114,8 +114,6 @@
<?php wp_footer(); ?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/11.0.5/swiper-bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.7.2/vanilla-tilt.min.js"></script>
<script>
AOS.init({
duration: 800, // 动画持续时间

@ -7,14 +7,16 @@
<meta name="google-site-verification" content="4-DXQwmh6Tn_4TiIaslQa4L-xJTXT0XBVn2dCB_A7F8" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<?php wp_head(); ?>
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&amp;display=swap" rel="stylesheet"/>
<link href="https://fonts.googleapis.com" rel="preconnect"/>
<link href="https://fonts.loli.net/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&amp;display=swap" rel="stylesheet"/>
<link href="https://fonts.loli.net" rel="preconnect"/>
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700;900&family=Liu Jian Mao Cao:wght@400;700&family=Montserrat:wght@400;500;700;800;900&family=Inter:wght@400;500;700;800;900&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet"/>
<link href="https://fonts.loli.net/css2?family=Space+Grotesk:wght@300;400;500;700;900&family=Liu Jian Mao Cao:wght@400;700&family=Montserrat:wght@400;500;700;800;900&family=Inter:wght@400;500;700;800;900&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/11.0.5/swiper-bundle.min.css" />
<!-- AOS Animation Library -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.7.2/vanilla-tilt.min.js"></script>
<!-- Tailwind & Config -->
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
@ -36,8 +38,8 @@
fontFamily: {
"display": ["Montserrat", "sans-serif"],
"sans": ["Montserrat", "sans-serif"],
"mono": ["JetBrains Mono", "Montserrat"],
"inter": ["Inter", "Montserrat"],
"mono": ["JetBrains Mono", "monospace"],
"inter": ["Inter", "monospace"],
},
borderRadius: {
"DEFAULT": "0.5rem",
@ -106,8 +108,8 @@
},
blobSpin: {
'0%': { transform: 'rotate(0deg) scale(1)' },
'50%': { transform: 'rotate(180deg) translate(-80%, 50%) scale(1.1)' },
'100%': { transform: 'rotate(360deg) translate(0) scale(1)' },
'50%': { transform: 'rotate(180deg) scale(1.1)' },
'100%': { transform: 'rotate(360deg) scale(1)' },
}
},
animation: {
@ -220,7 +222,7 @@
<body <?php body_class(); ?>>
<nav class="main-nav">
<div class="nav-container">
<div class="nav-logo flex items-center">
<div class="nav-logo flex">
<a class="flex flex-col" href="<?php echo home_url(); ?>">
<?php
$logo = get_theme_mod('site_logo');
@ -229,7 +231,7 @@
<?php else: ?>
<img src="https://nenghui.com/wp-content/uploads/2025/11/logo-2.png" alt="logo">
<?php endif; ?>
<p data-no-translation class="text-[12px] text-[#517bb9] text-justify pl-1 max-w-[12rem] hover:text-normal">Cleaner Energy. Greater Value. </p>
<p class="text-[12px] text-[#517bb9] hover:font-normal text-justify pl-1 ">Cleaner Energy. Greater Value.</p>
</a>
<a href="https://cn.nenghui.com/" class="ml-[2rem] text-[#295ca8] cursor-pointer relative group hover:text-[#295ca8]" data-no-translation>
中国版

@ -1,5 +1,5 @@
@charset "UTF-8";
/*
/*
Theme Name:
Theme URI: https://www.nhet.energy/
Author:
@ -7,25 +7,25 @@
Version: 1.5.0
*/
/* CSS文件已通过functions.php中的wp_enqueue_style正确加载移除@import以提升性能 */
/* CSS文件已通过functions.php中的wp_enqueue_style正确加载移除@import以提升性能 */
/* 字体声明 - 优先使用主题文件夹中的字体 */
/* 你可以在这里写一些自定义的全局CSS样式 */
* {
/* 你可以在这里写一些自定义的全局CSS样式 */
* {
margin:0;
padding:0;
font-family: "Montserrat", "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. 图片初始状态:透明 */
}
::-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); /* 平滑淡入 */
@ -59,71 +59,71 @@
50% { opacity: 0.5; }
}
table{
table{
width: 100%!important;
max-width: 100%!important;
}
/* 防止横向滚动条 */
html, body {
}
/* 防止横向滚动条 */
html, body {
/* overflow-x: hidden; */
overflow: initial;
max-width: 100%;
}
body {
}
body {
background: #f7f7f7;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 50% 50%;
padding-top: 80px;
}
.page-full-width{
}
.page-full-width{
max-width: 100%;
width: 100%;
height: auto;
margin-top: -5rem;
background: #fff;
}
.page-full-width .row {
}
.page-full-width .row {
margin-left: 0;
margin-right: 0;
}
h1, h2, h3, h4, h5, h6 {
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
/* color: #333; */
/* margin-bottom: 1rem; */
/*color: #333;*/
/*margin-bottom: 1rem;*/
transition: all 0.3s ease;
}
h2{
}
h2{
font-size: 20px;
}
strong, b {
}
strong, b {
font-weight: bold;
color: #2c3e50;
transition: all 0.3s ease;
}
.tinytyper {
}
.tinytyper {
font-size:3rem;
margin-top:10px;
text-align:center;
}
#footer {
}
#footer {
font-size: 16px;
display: flex;
justify-content: center;
padding: 10px;
}
.article-c, .box-b {
}
.article-c, .box-b {
width: 70%;
text-align: center;
padding: 20px;
height: auto;
margin: 0 auto;
}
.box-b {
}
.box-b {
text-align: center;
margin-bottom: 10px;
}
.box-c {
}
.box-c {
background: white;
border-color: #EEEEEE;
box-shadow: 0 0 10px 0 rgb(0 0 0 / 6%);
@ -131,10 +131,10 @@
border: 1px solid #eee;
border-radius: 0 0 10px 10px;
padding: 20px;
}
}
/* 导航菜单样式 */
.main-nav {
/* 导航菜单样式 */
.main-nav {
position: sticky;
top: 0;
left: 0;
@ -144,100 +144,100 @@
transition: transform 0.3s ease;
background-color: #fff;;
}
}
.nav-container {
max-width: 1320px;
.nav-container {
max-width: 1390px;
margin: 0 auto;
padding: 0 20px;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
}
.nav-logo {
.nav-logo {
display: flex;
align-items: center;
height: 100%;
/* padding: 10px; */
/* border-radius: 0 0 10px 10px; */
}
}
.nav-logo a {
.nav-logo a {
display: flex;
align-items: flex-start;
text-decoration: none;
}
}
.nav-logo img {
.nav-logo img {
height: 30px;
width: auto;
}
}
.nav-logo span {
.nav-logo span {
font-size: 1.2rem;
font-weight: 500;
color: #333;
margin-left: 10px;
}
}
.nav-menu {
.nav-menu {
height: 100%;
}
}
.menu-items {
.menu-items {
height: 100%;
display: flex;
align-items: center;
margin: 0;
padding: 0;
list-style: none;
}
}
.menu-items li {
.menu-items li {
margin: 0 15px;
height: 100%;
display: flex;
align-items: center;
position: relative;
cursor: pointer;
}
}
.menu-items li a {
.menu-items li a {
color: #333;
text-decoration: none;
font-size: 1rem;
padding: 8px 0;
border-radius: 4px;
transition: all 0.3s ease;
}
}
.menu-items li a:hover, .menu-items li.menu-item-has-children > a:hover {
/* background: rgba(0, 0, 0, 0.05); */
font-weight: normal;
color: #007cba !important;;
}
.menu-items li a:hover {
background: rgba(0, 0, 0, 0.05);
color: #000;
font-weight: 400;
}
/* 下拉菜单样式 */
/* 下拉菜单样式 */
.menu-items li.menu-item-has-children > a {
.menu-items li.menu-item-has-children > a {
position: relative;
}
}
.menu-items li.menu-item-has-children > a .dropdown-arrow {
.menu-items li.menu-item-has-children > a .dropdown-arrow {
font-size: 0.7rem;
/*margin-left: 8px;*/
padding: 10px 0 10px 10px;
transition: transform 0.3s ease;
display: inline-block;
color: inherit;
}
}
.menu-items li.menu-item-has-children:hover > a .dropdown-arrow {
.menu-items li.menu-item-has-children:hover > a .dropdown-arrow {
transform: rotate(180deg);
}
}
.sub-menu {
.sub-menu {
position: absolute;
top: 100%;
left: 0;
@ -254,23 +254,23 @@
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 {
.menu-items li:hover > .sub-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
}
.sub-menu li {
.sub-menu li {
width: 100%;
margin: 0;
height: auto;
display: block;
position: relative;
}
}
.sub-menu li a {
.sub-menu li a {
display: block;
padding: 12px 20px;
color: #333 !important;
@ -279,88 +279,88 @@
transition: all 0.3s ease;
white-space: nowrap;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
}
.sub-menu li:last-child a {
.sub-menu li:last-child a {
border-bottom: none;
}
}
.sub-menu li a:hover {
.sub-menu li a:hover {
background: #f8f9fa;
color: #007cba !important;
padding-left: 25px;
}
}
/* 三级菜单样式 */
.sub-menu .menu-item-has-children {
/* 三级菜单样式 */
.sub-menu .menu-item-has-children {
position: relative;
}
}
.sub-menu .menu-item-has-children > a .dropdown-arrow {
.sub-menu .menu-item-has-children > a .dropdown-arrow {
float: right;
transform: rotate(-90deg);
}
}
.sub-menu .menu-item-has-children:hover > a .dropdown-arrow {
.sub-menu .menu-item-has-children:hover > a .dropdown-arrow {
transform: rotate(90deg);
}
}
/* 多级下拉菜单 */
.sub-menu .sub-menu {
/* 多级下拉菜单 */
.sub-menu .sub-menu {
top: 0;
left: 100%;
margin-left: 2px;
margin-top: -8px;
}
}
.sub-menu li:hover > .sub-menu {
.sub-menu li:hover > .sub-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
}
/* 为有子菜单的项目添加箭头 */
.sub-menu li.menu-item-has-children > a::after {
/* 为有子菜单的项目添加箭头 */
.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 {
.sub-menu li.menu-item-has-children:hover > a::after {
color: #007cba;
}
}
.sub-menu .menu-item-has-children:hover > .sub-menu {
.sub-menu .menu-item-has-children:hover > .sub-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
}
.menu-toggle {
.menu-toggle {
display: none;
background: none;
border: none;
cursor: pointer;
padding: 10px;
}
}
.menu-toggle span {
.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 {
.main-nav.scrolled .menu-toggle span {
background: #888;
}
}
/* 响应式设计 */
@media screen and (max-width: 1225px) {
/* 响应式设计 */
@media screen and (max-width: 1225px) {
.menu-toggle {
display: block;
}
@ -510,82 +510,82 @@
form.fluent_form_1 .ff-btn-submit:not(.ff_btn_no_style){
width: 100%;
}
}
}
/* 文章卡片网格布局 */
.content-area {
/* 文章卡片网格布局 */
.content-area {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
}
.posts-grid {
.posts-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 30px;
margin-bottom: 40px;
}
}
/* 文章卡片样式 */
.post-card {
/* 文章卡片样式 */
.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 {
.post-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
}
.post-content {
.post-content {
padding: 20px;
}
}
.post-title {
.post-title {
margin: 0 0 15px 0;
font-size: 1.25rem;
line-height: 1.4;
}
}
.post-title a {
.post-title a {
color: #333;
text-decoration: none;
transition: color 0.2s ease;
}
}
.post-title a:hover {
.post-title a:hover {
color: #007bff;
transition: all 0.3s ease;
}
}
.post-meta {
.post-meta {
font-size: 0.875rem;
color: #666;
margin-bottom: 15px;
display: flex;
gap: 15px;
}
}
.post-date, .post-category {
.post-date, .post-category {
display: flex;
align-items: center;
}
}
.post-category a {
.post-category a {
color: #666;
text-decoration: none;
}
}
.post-category a:hover {
.post-category a:hover {
color: #007bff;
transition: all 0.3s ease;
}
}
.post-excerpt {
.post-excerpt {
color: #666;
font-size: 0.95rem;
line-height: 1.6;
@ -595,22 +595,22 @@
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
}
}
/* 无文章提示 */
.no-posts {
/* 无文章提示 */
.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 {
.no-posts h2 {
color: #666;
font-size: 1.5rem;
margin: 0;
}
.accordion-body{
}
.accordion-body{
color: #000000!important;
}
}

Loading…
Cancel
Save