From 342df49a4162a23b5e8a4cd58a8229561629c55d Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Sun, 19 Aug 2018 22:40:38 +0800 Subject: [PATCH] home --- .../Home/View/Default/Index/Index.html | 33 +------------- .../View/Default/Public/HeaderTopNav.html | 44 ++++++++++--------- service/Public/Home/Default/Css/Common.css | 5 ++- service/Public/Home/Default/Css/Index.css | 3 +- service/Public/Home/Default/Js/Index.js | 31 +++++++++++++ 5 files changed, 60 insertions(+), 56 deletions(-) create mode 100644 service/Public/Home/Default/Js/Index.js diff --git a/service/Application/Home/View/Default/Index/Index.html b/service/Application/Home/View/Default/Index/Index.html index ec2336842..07f3f9956 100755 --- a/service/Application/Home/View/Default/Index/Index.html +++ b/service/Application/Home/View/Default/Index/Index.html @@ -258,35 +258,4 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/service/Application/Home/View/Default/Public/HeaderTopNav.html b/service/Application/Home/View/Default/Public/HeaderTopNav.html index 09d6a9648..d8432637b 100755 --- a/service/Application/Home/View/Default/Public/HeaderTopNav.html +++ b/service/Application/Home/View/Default/Public/HeaderTopNav.html @@ -1,25 +1,27 @@ -
- - + + +
\ No newline at end of file diff --git a/service/Public/Home/Default/Css/Common.css b/service/Public/Home/Default/Css/Common.css index 2e06ad392..55c0cd930 100755 --- a/service/Public/Home/Default/Css/Common.css +++ b/service/Public/Home/Default/Css/Common.css @@ -107,6 +107,8 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;} /*侧边导航*/ .mui-mbar-tabs{ display:none;} +/* 顶部小导航 */ +.header-top { background-color: #eee; } .header{ display:none; max-width:1000px; margin:0px auto; font-size:12px;} .footer-bd{ display:none} @@ -150,7 +152,7 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;} .nav.white .logoBig{ display:block;float:left;height:40px;width:135px; margin:0px auto; margin-left:2%;margin-top: 5px;} .nav.white .logoBig img{width:100%;} .my-cart { width: 46px;height: 46px;} - .search-bar {height: 51px;margin: 0px 50px 0 120px; padding-left:5%;} + .search-bar {height: 51px;margin: 10px 50px 10px 120px; padding-left:5%;} #ai-topsearch {height: 46px;} .search-bar input {width: 80%;height:46px;} .my-cart a{display:block; margin-top:5px} @@ -197,6 +199,7 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;} .nav-cont li{float: left;height: 45px;line-height: 45px;} .nav-cont li::before{content: '\20';display: inline-block;height: 16px;border-right: 1px solid #d9d9d9;width: 0;vertical-align: middle;margin-left: -1px;} .nav-cont li a {font-size: 16px;color: #333;line-height: 36px;margin-left: -1px;padding: 0 25px;text-decoration: none;font-weight: 700;display: inline-block;vertical-align: middle;} + .nav-cont li a:hover { color:#d2364c; } .nav-cont .nav-extra{position: absolute;right:0px ;top:6px;font-size: 16px;color:#fcff00;line-height:33px;height:33px ;width:160px;text-align:center;background: url(../Images/extra.png);cursor: pointer;} .nav-cont .nav-extra i.nav-user{background:#000 ;color:#fff ;width: 33px;height: 33px;border-radius: 33px;position: absolute;left:-28px;z-index: 99;padding: 5px;overflow: hidden;} diff --git a/service/Public/Home/Default/Css/Index.css b/service/Public/Home/Default/Css/Index.css index b15e70d80..6ade96eb8 100755 --- a/service/Public/Home/Default/Css/Index.css +++ b/service/Public/Home/Default/Css/Index.css @@ -32,7 +32,7 @@ dt + dd {margin-top: 0;} /*走马灯*/ .marqueen{position: relative;border-top:1px solid #F5F5F5 ;border-bottom: 1px #f5f5f5 solid;overflow: hidden;} -.marqueen-title{position: absolute;top:8px;left:10px;padding-right:10px;border-right:1px solid #F5F5F5 ;} +.marqueen-title{position: absolute;left:10px;padding-right:10px;border-right:1px solid #F5F5F5 ; line-height: 30px; height: 30px;} .banner-news li,#banner-news li a{height: 30px;line-height:30px; font-size: 12px; overflow: hidden;} .banner-news{max-width:1200px; margin:0px auto;margin-left:60px;overflow:hidden;height:30px;width:100%; text-align:left;color:#ffffff;} .banner-news li {padding:0px 20px;} @@ -156,7 +156,6 @@ text-align: center;float:none} .items-nav-title{background: #fff;} .hmtop{background: #fff;} .am-container {padding-left:0px;padding-right:0px ;} - .am-container.header{padding-left:21px; padding-right:40px ;} .shopMainbg{width:100%;background:#fff;overflow:visible;} .slideall{position: relative;} .shopNav{margin-top:0px;} diff --git a/service/Public/Home/Default/Js/Index.js b/service/Public/Home/Default/Js/Index.js new file mode 100644 index 000000000..a9034031f --- /dev/null +++ b/service/Public/Home/Default/Js/Index.js @@ -0,0 +1,31 @@ +$(function() +{ + // 新闻轮播 + if ($(window).width() < 640) { + function autoScroll(obj) { + $(obj).find("ul").animate({ + marginTop: "-39px" + }, 500, function() { + $(this).css({ + marginTop: "0px" + }).find("li:first").appendTo(this); + }) + } + setInterval(function() + { + autoScroll(".banner-news"); + }, 3000); + } + + // 分类事件显示/隐藏 + $(".category-content li").hover(function() { + $(".category-content .category-list li.first .menu-in").css("display", "none"); + $(".category-content .category-list li.first").removeClass("hover"); + $(this).addClass("hover"); + $(this).children("div.menu-in").css("display", "block") + }, function() { + $(this).removeClass("hover") + $(this).children("div.menu-in").css("display", "none") + }); + +}); \ No newline at end of file