header.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <style>
  2. #fixed-header {
  3. height: 120px;
  4. }
  5. #header.fix-header{
  6. position: fixed;
  7. /* padding: 10px 0; */
  8. width: 100%;
  9. height: 113px;
  10. background: #fff;
  11. z-index: 1001;
  12. top: 0;
  13. padding: 10px 0;
  14. -webkit-box-shadow: 0 2px 0 0 #ccc;
  15. box-shadow: 0 2px 0 0 #ccc;
  16. }
  17. #header .header-main {
  18. height: 100px;
  19. width: 1190px;
  20. margin: auto;
  21. }
  22. #header .header-main > li {
  23. display: inline-block;
  24. margin: 0 !important;
  25. vertical-align: middle;
  26. text-align: center;
  27. }
  28. #header .header-main >li:first-child {
  29. height: 100%;
  30. width: 111px; /*inline元素的宽度会受到别的元素的影响,如果不设置宽度,则会被ghost-center设置的伪元素挤到下方*/
  31. /*margin-left: -5.5em;*/
  32. }
  33. #header .mall-logo {
  34. line-height: 100px;
  35. }
  36. #header .header-main .mall-slogan {
  37. width: 250px;
  38. }
  39. #header .header-main .mall-slogan p{
  40. font-size: 14px;
  41. line-height: 20px;
  42. font-weight: bold;
  43. padding-top: 4px;
  44. text-align: left;
  45. color: #5078cb;
  46. border-left: #5078cb 1px solid;
  47. padding-left: 12px;
  48. margin-left: 10px;
  49. padding-top: 0;
  50. }
  51. #header .header-main .mall-search {
  52. width: 470px;
  53. height: 40px;
  54. font-size: 12px;
  55. margin-bottom: 10px;
  56. }
  57. #header .header-main .mall-search input.form-control, #header .header-main .mall-search button.btn-default {
  58. width: 440px;
  59. height: 40px;
  60. border: 2px solid #5078cb;
  61. border-radius: 0;
  62. }
  63. #header .header-main .mall-search button.btn-default {
  64. background-color: #5078cb;
  65. color: rgb(255, 255, 255);
  66. font-size: 16px;
  67. width: 78px;
  68. }
  69. #header .header-main .mall-search .active-search {
  70. text-align: left;
  71. margin-top: 4px;
  72. }
  73. #header .header-main .mall-search .active-search .active-search-body .active-search-item {
  74. line-height: 20px;
  75. color: #ff0101;
  76. font-size: 12px;
  77. display: inline-block;
  78. margin-right: 1em;
  79. }
  80. #header .header-main .mall-search .active-search .active-search-body .active-search-item a{
  81. color: #838383;
  82. }
  83. #header .header-main .mall-search .active-search .active-search-body .active-search-item a:hover{
  84. color: #ff0101;
  85. }
  86. #header .header-main .mall-search .association {
  87. position: absolute;
  88. left: 0;
  89. top: 100%;
  90. right: 61px;
  91. list-style: none;
  92. -webkit-padding-start: 0;
  93. background: #ffffff;
  94. border: 1px solid #dddddd;
  95. z-index: 21;
  96. width: 392px;
  97. }
  98. #header .header-main .mall-search .association li {
  99. padding: 0 15px;
  100. line-height: 30px;
  101. text-align: left;
  102. overflow: hidden;
  103. text-overflow: ellipsis;
  104. white-space: nowrap;
  105. }
  106. #header .mall-cart{
  107. width:140px;
  108. height: 30px;
  109. line-height: 28px;
  110. display: inline-block;
  111. border: #bfbfbf 1px solid;
  112. border-radius: 5px;
  113. font-size: 14px;
  114. color: #5078cb;
  115. position: relative;
  116. }
  117. #header .mall-cart em{
  118. width: 22px;
  119. height: 22px;
  120. display: inline-block;
  121. background: #ff0000;
  122. border-radius: 100%;
  123. text-align: center;
  124. color: #fff;
  125. line-height: 22px;
  126. position: absolute;
  127. right: -5px;
  128. top: -12px;
  129. font-style: inherit;
  130. font-size: 12px;
  131. }
  132. #header .visitor-count{
  133. color: #787878;
  134. font-weight: bold;
  135. }
  136. #header .mall-cart:hover{
  137. border: #5078cb 1px solid;
  138. }
  139. #header .header-main .mall-search .association li.active, #header .header-main .mall-search .association li.active:hover {
  140. background: #dddddd;
  141. }
  142. #header .header-main .mall-search .association li:hover {
  143. background: #EEEEEE;
  144. cursor: pointer;
  145. }
  146. #header .nav-main {
  147. list-style: none;
  148. }
  149. #header .header-main .mall-search .type{
  150. position: absolute;
  151. top: -21px;
  152. }
  153. #header .header-main .mall-search .type .type-item{
  154. padding: 4px 12px;
  155. color: #5078cb;
  156. font-size: 14px;
  157. cursor: pointer;
  158. }
  159. #header .header-main .mall-search .type .type-item:hover,#header .header-main .mall-search .type .type-item.active{
  160. background: #4071c6;
  161. color: #fff;
  162. }
  163. </style>
  164. <div ng-controller="SearchCtrl">
  165. <div id="fixed-header">
  166. <header id="header" role="banner" ng-class="{'fix-header': isFixed}">
  167. <div class="container">
  168. <ul class="header-main list-unstyled">
  169. <li class="ghost-center">
  170. <div class="mall-logo">
  171. <a ng-click="b2cLink('/')" target="_self" >
  172. <img src="static/img/all/uas_mall.png" alt="返回首页"/>
  173. </a>
  174. </div>
  175. </li>
  176. <li>
  177. <div class="mall-slogan"><p>For the World<br/>为世界电子产业创造价值</p></div>
  178. </li>
  179. <li>
  180. <div class="mall-search">
  181. <div class="input-group">
  182. <div class="type">
  183. <span class="type-item" ng-class="{'active': searchType === 'component'}" ng-click="setTypeClick('component')">型号</span>
  184. <span class="type-item" ng-class="{'active': searchType === 'kind'}" ng-click="setTypeClick('kind')">物料名称</span>
  185. <span class="type-item" ng-class="{'active': searchType === 'store'}" ng-click="setTypeClick('store')">卖家</span>
  186. <span class="type-item" ng-class="{'active': searchType === 'brand'}" ng-click="setTypeClick('brand')">品牌</span>
  187. </div>
  188. <input ng-model="keyword" ng-change="onChange()" type="text" class="form-control"
  189. placeholder="{{placeholderSearch}}" ng-search="search()" ng-focus="onFocus()"
  190. ng-blur="onBlur()" ng-keyup="onKeyup()"/>
  191. <span class="input-group-btn" ng-click="search()">
  192. <button class="btn btn-default" type="button">搜索</button>
  193. </span>
  194. <ul class="association" ng-show="keyword && (associate || associateEnter)" ng-mouseenter="onAssociateEnter()"
  195. ng-mouseleave="onAssociateLeave()">
  196. <li ng-repeat="as in associates" ng-bind="as.code" ng-class="{'active': $index==selectIndex}"
  197. ng-click="onAssociateClick(as.code)"></li>
  198. <li ng-repeat="as in associates" ng-bind="as.nameCn" ng-class="{'active': $index==selectIndex}"
  199. ng-click="onAssociateClick(as.nameCn)"></li>
  200. <li ng-repeat="as in associates" ng-bind="as.name" ng-class="{'active': $index==selectIndex}"
  201. ng-click="onAssociateClick(as.name)"></li>
  202. </ul>
  203. </div>
  204. <div class="active-search">
  205. <ul class="list-untyled active-search-body" style="padding: 0;">
  206. <li class="active-search-item">热门搜索</li>
  207. <li class="active-search-item" ng-repeat="hw in hotwords"><a ng-href="{{hw.url}}" ng-bind="hw.name"></a></li>
  208. </ul>
  209. </div>
  210. </div>
  211. </li>
  212. </ul>
  213. </div>
  214. </header>
  215. </div>
  216. <!--nav 导航-->
  217. <nav role="navigation" class="nav-main">
  218. <ul class="container">
  219. <li><a class="more-title" ng-click="b2cLink('/product/kind/home')">器件选型</a></li>
  220. <li>
  221. <a ng-click="b2cLink('/')">&nbsp;&nbsp;首页</a>
  222. </li>
  223. <li>
  224. <a ng-click="b2cLink('/applyPurchase')">询价求购</a>
  225. <img class="new-animate" src="static/img/all/banner-cuxiao03.png" alt="">
  226. </li>
  227. <li>
  228. <a ng-click="b2cLink('/supplier')">供应商</a>
  229. </li>
  230. <li>
  231. <a ui-sref="home" class="active">B2B商务</a>
  232. <img class="new-animate" src="static/img/all/hot.png" alt="">
  233. </li>
  234. <li>
  235. <a ng-click="b2cLink('/provider/shop')">店铺</a>
  236. </li>
  237. <li>
  238. <a ng-click="b2cLink('/product/brand/brandList/A')">品牌墙</a>
  239. </li>
  240. <li>
  241. <a ng-click="b2cLink('/pcb')">PCB专区</a>
  242. </li>
  243. <li>
  244. <a ng-click="b2cLink('/news')">优软快讯</a>
  245. </li>
  246. </ul>
  247. </nav>
  248. </div>
  249. <script language="javascript" type="text/javascript">
  250. $(function () {
  251. var targetChildrem_Height = $('.scroll-data dl').height();
  252. setInterval(function () {
  253. var target = $('.scroll-data')
  254. target.append(target.children(':first').clone(true));
  255. target.animate({
  256. scrollTop:targetChildrem_Height
  257. },function () {
  258. target.scrollTop(0);
  259. target.children(':first').remove();
  260. })
  261. },6000)
  262. })
  263. </script>