1.14添加锚点

master
Gongxinshu 2022-01-14 11:43:21 +08:00
parent 79a1fecc1c
commit 6c867cd4af
7 changed files with 19 additions and 9 deletions

View File

@ -179,7 +179,9 @@ input,select,textarea{outline:medium none; resize: none;}
.page-banner .info p{ font-size: 1.875rem; text-shadow: 0 0 5px rgba(0,0,0,0.5);}
.page-banner .info .w-1200{ position: relative;}
.page-banner .info .w-1200::after{ content: ''; width: 5rem; height: 6.5625rem; background: url(../image/icon_jt2.png) no-repeat center #fff; background-size: 2.125rem; box-shadow: 0 0 5px rgba(0,0,0,0.3); position: absolute; left: 0; top: 100%; margin-top: 0.9375rem;}
.pt118{
padding-top: 120px;
}
.all-title-box2 span{ display: block; font-size: 2.7rem;}
.all-title-box2 p{ font-size: 1.125rem; color: #666; margin-top: 0.1875rem;}
.disFlex{display: flex;justify-content: space-between}
@ -275,7 +277,7 @@ input,select,textarea{outline:medium none; resize: none;}
.service-box3 .box-info .pull-right::after{ content: ''; width: 3.125rem; height: 3.125rem; border-bottom: 0.25rem solid #ccc; border-right: 0.25rem solid #ccc; position: absolute; right: 0; bottom: 0;}
*/
.marketing-box1{ padding: 10rem 0 0;}
.marketing-box1{ padding: 6rem 0 2rem;height: 100vh;box-sizing: border-box}
.marketing-box1 .box-info{ padding-bottom: 4.5rem;}
.marketing-box1 .box-info .pull-left{ background: url(../image/icon_1.png) no-repeat 0 0; background-size: 1.4375rem; padding:0.3rem 0 0 2.5rem;}
.marketing-box1 .box-info .pull-left span{ display: block; color: #222;}
@ -337,7 +339,7 @@ input,select,textarea{outline:medium none; resize: none;}
.news-info .lower-box a:hover{ color: #578df3;}
.news-info .lower-box a.btns{ display: inline-block; background: #00418f; color: #fff; padding: 0 3.15rem; line-height: 24px; font-size: 0.8rem; margin-top: 2rem;}
.contact-box1{ padding: 10rem 0 3.75rem;}
.contact-box1{ padding: 6rem 0 3.75rem;}
.contact-box1 .between-top{ padding-bottom: 7rem;}
.contact-box1 .between-top .box-info{ width: 21rem;}
.contact-box1 .between-top .box-info p{ margin-top: 3.4375rem; font-size: 0.875rem; line-height: 1.6;}

View File

@ -3,7 +3,7 @@
<!-- banner -->
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
<div class="info">
<div class="w-1200">
<div class="w-1200 pt118" id="news">
<strong>{$category.title ?? ''}</strong>
<p>{:nl2br($category.description ?? '')}</p>
</div>

View File

@ -3,7 +3,7 @@
<!-- banner -->
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
<div class="info">
<div class="w-1200">
<div class="w-1200 pt118" id="news">
<strong>{$topCategory.title ?? ''}</strong>
<p>{:nl2br($topCategory.description ?? '')}</p>
</div>

View File

@ -1,7 +1,7 @@
{layout name="layout" /}
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban4.jpg')});">
<div class="info">
<div class="w-1200">
<div class="w-1200 pt118" id="news">
<strong>{$category.title ?? ''}</strong>
<p>{:nl2br($category.description ?? '')}</p>
</div>

View File

@ -3,7 +3,7 @@
<!-- banner -->
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
<div class="info">
<div class="w-1200">
<div class="w-1200 pt118">
<strong>{$topCategory.title ?? ''}</strong>
<p>{:nl2br($topCategory.description ?? '')}</p>
</div>

View File

@ -3,7 +3,7 @@
<!-- banner -->
<div class="page-banner w-100" style="background-image: url({:getImgSrc($topCategory, '__IMG__/page_ban3.jpg')});">
<div class="info">
<div class="w-1200">
<div class="w-1200 pt118" id="product">
<strong>{$category.title ?? ''}</strong>
<p>{:nl2br($category.description ?? '')}</p>
</div>
@ -40,7 +40,7 @@
}
{/php}
<div class="product-item {$active}">
<a href="{:url('article/index', ['category_id'=>$cate.id])}">{$cate.title}</a>
<a href="{:url('article/index#product', ['category_id'=>$cate.id])}">{$cate.title}</a>
</div>
{/foreach}
{/if}

View File

@ -1,4 +1,5 @@
{php}
//dump($menus);
function getMenus($menus, $level = 1, $currentFirstId, $categoryId) {
$menuHtml = '';
$levelList = ['nav-first','nav-second','nav-third'];
@ -31,7 +32,14 @@ function getMenus($menus, $level = 1, $currentFirstId, $categoryId) {
}
$menuHtml .= '</li>';
} else {
if($menu['template_list']=='products'){
$menuHtml .= '<a href="'.$aHref.'#product" target="'.$menu['style'].'" class="'.$activeClass.'">';
}else if($menu['template_list']=='news'){
$menuHtml .= '<a href="'.$aHref.'#news" target="'.$menu['style'].'" class="'.$activeClass.'">';
}else
{
$menuHtml .= '<a href="'.$aHref.'" target="'.$menu['style'].'" class="'.$activeClass.'">';
}
$menuHtml .= '<span '.$spanClass.'>'.$menu['title'].'</span>';
if ($hasChild) {
$menuHtml .= getMenus($menu['children'], $level + 1, $currentFirstId, $categoryId);