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