header.html 9.7 KB

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