这个模板头部是仿照京东商品详情的http://item.m.jd.com/product/1019570492.html,顶部右侧的图标可点击,会出现栏目菜单按钮,再次点击会隐藏。代码很简单,需要的朋友直接引用css文件加一个js收缩方法。
0、请不要问“在不在”之类的问题,有问题直接问!1、学生或暂时没有工作的童鞋,整站资源免费下载!2、¥9.9充值终身VIP会员,加我微信,826096331 拉你进VIP群学习!3、程序员加油,技术改变世界。在线 充值
头部html
<header class="jd-header">
<div class="jd-header-new-bar">
<div class="jd-header-icon-back" id="m_common_header_goback"><span></span></div>
<!-- <div class="jd-header-title">商品</div>-->
<ul id="header-tabs" class="jd-header-title">
<li class="header-tab-item J_ping">
<p id="detailView" class="header-tab-title header-tab-selected">商品</p>
</li>
<li id="detailInfo" class="header-tab-item J_ping">
<p class="header-tab-title">详情</p>
</li>
<li id="pingjia" class="header-tab-item J_ping">
<p class="header-tab-title">评价</p>
</li>
</ul>
<div class="jd-header-icon-shortcut J_ping" id="m_common_header_jdkey" onclick="showHeadMenus()"><span></span></div>
<div class="header-bar-border"></div>
</div>
<ul class="jd-header-shortcut" id="m_common_header_shortcut">
<li id="m_common_header_shortcut_m_index">
<a href="http://www.erdangjiade.com/" class="J_ping">
<span class="shortcut-home"></span>
<strong>首页</strong>
</a>
</li>
<li id="m_common_header_shortcut_category_search" class="J_ping">
<a href="http://www.erdangjiade.com/templates">
<span class="shortcut-categories"></span>
<strong>分类搜索</strong>
</a>
</li>
<li id="m_common_header_shortcut_p_cart" class="J_ping">
<a id="html5_cart" href="http://www.erdangjiade.com/js">
<span class="shortcut-cart"></span>
<strong>购物车</strong>
</a>
</li>
<li class=" current" id="m_common_header_shortcut_h_home">
<a href="http://www.erdangjiade.com/sites"class="J_ping">
<span class="shortcut-my-account"></span>
<strong>我的京东</strong>
</a>
</li>
</ul>
</header>
CSS
.jd-header, .jd-header a {
color: #252525;
font-family: "PingHei","Lucida Grande","Lucida Sans Unicode","STHeiti","Helvetica","Arial","Verdana","sans-serif";
font-size: 16px;
text-decoration: none;
}
.jd-header-icon-back span, .jd-header-icon-shortcut span, .jd-header-icon-cancel span, .jd-header-icon-logo span, .jd-header-shortcut span, .jd-header-icon-category span, .jd-header-icon-search span, .jd-header-icon-close::after, .jd-auto-complete-list li::before, .jd-footer-platforms li a::before, .jd-footer-platforms li a.badge::after, .jd-search-tab li.sort-by-integrative a::after, .jd-search-tab li.sort-by-integrative.active a::after, .jd-search-tab li.sort-by-price a::after, .jd-search-tab li.sort-by-price.active a.arrow-down::after, .jd-search-tab li.sort-by-price.active a.arrow-up::after, .sidebar-categories .arrow, .sidebar-categories li li.checked .tick, .sidebar-btn-location::after, .supplier-arrow-right, .landing-keywords a::before, .hot-search-bar span i::before {
background: url("../images/jd-sprites.png?v=12") no-repeat scroll 0 0 / 200px 200px;
display: block;
}
.jd-header {
color: #252525;
margin: 0;
min-height: 44px;
padding: 0;
text-decoration: none;
width: 100%;
}
.jd-header-new-bar {
background: #efefef url("../images/header-bg.png?v=2") repeat-x scroll 0 0 / 100% 44px;
min-height: 44px;
position: relative;
width: 100%;
z-index: 20;
}
.jd-header-icon-back, .jd-header-icon-logo {
height: 44px;
position: absolute;
width: 40px;
}
.jd-header-icon-back span, .jd-header-icon-shortcut span, .jd-header-icon-cancel span, .jd-header-icon-search span {
overflow: hidden;
text-indent: -100px;
}
.jd-header-icon-back span {
background-position: -20px 0;
height: 20px;
margin: 12px 0 0 10px;
width: 20px;
}
#header-tabs {
margin: 0 80px;
overflow: hidden;
}
.jd-header-title {
font-size: 16px;
height: 44px;
line-height: 44px;
margin: 0 50px;
text-align: center;
}
.header-tab-item {
float: left;
overflow: hidden;
text-align: center;
white-space: nowrap;
width:33.33%;
}
.header-tab-title {
color: #222;
font-size: 16px;
line-height: 16px;
padding-bottom: 14px;
padding-top: 14px;
}
.header-tab-selected {
border-bottom: 3px solid #222;
font-size: 18px;
line-height: 18px;
padding-bottom: 11px;
padding-top: 13px;
}
.jd-header-icon-shortcut, .jd-header-icon-category {
height: 44px;
overflow: hidden;
position: absolute;
right: 0;
top: 0;
width: 40px;
}
.jd-header-icon-shortcut span {
background-position: -60px 0;
height: 20px;
margin: 12px 10px 0;
width: 20px;
}
.header-bar-border {
border-bottom: 1px solid #bbb;
border-image: url("../images/head_right_list.gif") 2 0 2 0 round round;
border-width: 0 0 1px;
margin-top: -1px;
}
.jd-header-shortcut {
background: #404042 none repeat scroll 0 0;
/* display: table;*/
height: 57px;
width: 100%;
display: none
}
.jd-header-shortcut li {
display: table-cell;
text-align: center;
width: 25%;
}
.jd-header-shortcut a {
border: 0 none;
color: #fff;
}
.jd-header-shortcut span.shortcut-home {
background-position: -30px -27px;
}
.jd-header-shortcut span {
height: 30px;
margin-top: 6px;
width: 30px;
}
.jd-header-shortcut span, .jd-header-shortcut strong {
color: #fff;
display: block;
font-size: 12px;
font-weight: normal;
line-height: 1;
margin: 0 auto;
}
.jd-header-shortcut span, .jd-header-shortcut strong {
color: #fff;
display: block;
font-size: 12px;
font-weight: normal;
line-height: 1;
margin: 0 auto;
}
.jd-header-shortcut span.shortcut-categories {
background-position: -60px -27px;
}
.jd-header-shortcut span.shortcut-cart {
background-position: -90px -27px;
}
.jd-header-shortcut span.shortcut-my-account {
background-position: -120px -27px;
}
.jd-header-shortcut span {
height: 30px;
margin-top: 6px;
width: 30px;
}
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群