Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. // nav sizeing
  2. $(window).on("scroll resize load", function () {
  3.  
  4. if($(window).width() > 863) {
  5.  
  6. wide();
  7.  
  8. if ($(window).scrollTop() > 75) {
  9. headerLow();
  10. } else {
  11. headerHigh();
  12. }
  13. }
  14. else {
  15. headerLow();
  16. thin();
  17. }
  18. });
  19.  
  20. var headerHigh = function () {
  21. $('#head').removeClass('mini');
  22. $('#head').css('height', '75' );
  23. };
  24.  
  25. var headerLow = function () {
  26. $('#head').addClass('mini');
  27. $('#head').css('height', '60' );
  28. };
  29.  
  30. var thin = function() {
  31. $('#slider').css({ 'padding-top' : '60px'});
  32.  
  33. };
  34.  
  35. var wide = function() {
  36. $('#slider').css( 'padding-top' , '78px');
  37. };
  38. // end nav sizeing
  39.  
  40. <div id="head">
  41. <div class="container">
  42. <a href="#"><strong class="logo pull-left"><h1>CAVO</h1>
  43. </strong></a> <!-- end logo !-->
  44. <ul class="nav pull-right">
  45. <li><a href="#">Menu</a>
  46. <ul>
  47. <li><a href="#">Starters</a></li>
  48. <li><a href="#">Breakfast and Brunch</a></li>
  49. <li><a href="#">Salads</a></li>
  50. <li><a href="#">Sandwiches and Wraps</a></li>
  51. <li><a href="#">Pasta</a></li>
  52. <li><a href="#">Mains</a></li>
  53. <li><a href="#">Pizza</a></li>
  54. </ul>
  55. </li>
  56. <li><a href="#">About Us</a></li>
  57. <li><a href="#">Contact</a></li>
  58. </ul>
  59. </div><!-- end container !-->
  60. </div> <!-- end header !-->
  61.  
  62. html, body, div, span, applet, object, iframe,
  63. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  64. a, abbr, acronym, address, big, cite, code,
  65. del, dfn, em, img, ins, kbd, q, s, samp,
  66. small, strike, strong, sub, sup, tt, var,
  67. b, u, i, center,
  68. dl, dt, dd, ol, ul, li,
  69. fieldset, form, label, legend,
  70. table, caption, tbody, tfoot, thead, tr, th, td,
  71. article, aside, canvas, details, embed,
  72. figure, figcaption, footer, header, hgroup,
  73. menu, nav, output, ruby, section, summary,
  74. time, mark, audio, video {
  75. margin: 0;
  76. padding: 0;
  77. border: 0;
  78. font-size: 100%;
  79. font: inherit;
  80. vertical-align: baseline;
  81. }
  82. /* HTML5 display-role reset for older browsers */
  83. article, aside, details, figcaption, figure,
  84. footer, header, hgroup, menu, nav, section {
  85. display: block;
  86. }
  87. body {
  88. line-height: 1;
  89. }
  90. ol, ul {
  91. list-style: none;
  92. }
  93. blockquote, q {
  94. quotes: none;
  95. }
  96. blockquote:before, blockquote:after,
  97. q:before, q:after {
  98. content: '';
  99. content: none;
  100. }
  101. table {
  102. border-collapse: collapse;
  103. border-spacing: 0;
  104. }
  105.  
  106. /* End Reset / Start Head
  107. -------------------------------
  108. */
  109.  
  110. body, html {
  111. height: 100%;
  112. font-size: 18px;
  113. font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
  114. color: #fff;
  115. background-color: #472626;
  116. }
  117.  
  118. a {
  119. text-decoration: none;
  120. color: inherit;
  121. }
  122.  
  123. #head {
  124. height: 76px;
  125. width: 100%;
  126. background-color: #472626;
  127. position: fixed;
  128. z-index: 10000;
  129. -webkit-transition: all 300ms ease-out;
  130. -moz-transition: all 300ms ease-out;
  131. -ms-transition: all 300ms ease-out;
  132. -o-transition: all 300ms ease-out;
  133. transition: all 300ms ease-out;
  134. }
  135.  
  136. .container {
  137. max-width: 1400px;
  138. padding-left: 20px;
  139. padding-right: 20px;
  140. margin-left: auto;
  141. margin-right: auto;
  142. }
  143.  
  144. .logo {
  145. line-height: 75px;
  146. text-align:left;
  147. -webkit-transition: font-size 2s ease , line-height 0.5s ease;
  148. -moz-transition: font 0.3s ease , line-height 0.5s ease;
  149. -o-transition: font 0.3s ease , line-height 0.5s ease;
  150. -ms-transition: font 0.3s ease , line-height 0.5s ease;
  151.  
  152.  
  153. }
  154.  
  155. .logo h1 {
  156. font-size: 2.8em;
  157. font: "Segoe UI Semibold";
  158. display:block;
  159. }
  160.  
  161. .pull-left {
  162. float: left;
  163. }
  164.  
  165. .pull-right {
  166. float:right;
  167. }
  168.  
  169. .nav {
  170. font-size: 1.3em;
  171. font-family: "wf_SegoeUILight","wf_SegoeUI","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe","Segoe WP","Tahoma","Verdana","Arial","sans-serif";
  172. font-weight: 100;
  173. position: relative;
  174. }
  175.  
  176. .nav li {
  177. float:left;
  178. padding-left: 15px;
  179. line-height: 80px;
  180. -webkit-transition: line-height 0.5s ease;
  181. -moz-transition: line-height 0.3s ease;
  182. -o-transition: line-height 0.3s ease;
  183. -ms-transition: line-height 0.3s ease;
  184. position: relative;
  185. }
  186.  
  187. .nav li a {
  188. opacity: 1;
  189. -webkit-transition: opacity .2s ease-in-out;
  190. -moz-transition: opacity .2s ease-in-out;
  191. -ms-transition: opacity .2s ease-in-out;
  192. -o-transition: opacity .2s ease-in-out;
  193. transition: opacity .2s ease-in-out;
  194. }
  195.  
  196. .nav li a:hover {
  197. opacity: .6;
  198. }
  199.  
  200. .nav li ul {
  201. background-color: #2B0909;
  202. position: fixed;
  203. top: 80px;
  204. width: 100%;
  205. left: 0px;
  206. text-align: center;
  207. height: 40px;
  208. z-index: -1000;
  209. }
  210.  
  211.  
  212. .nav li > ul li{
  213. display: inline-block;
  214. font-size: 0.9em;
  215. line-height: 10px;
  216. float: none;
  217. }
  218.  
  219. /* Mini Head
  220. *******************/
  221.  
  222.  
  223. .mini ul.nav > li, .mini .logo {
  224. line-height: 60px;
  225. }
  226.  
  227. .mini h1 {
  228. font-size: 2em;
  229.  
  230. }
  231.  
  232.  
  233.  
  234. /* End Header / Start Slider
  235. -----------------------------*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement