Schmidtchen (Talk | contribs) |
Schmidtchen (Talk | contribs) |
||
Line 88: | Line 88: | ||
<style> | <style> | ||
+ | |||
+ | |||
+ | @media screen and (min-width: 768px){ | ||
+ | CSS | ||
+ | } | ||
+ | #custom-nav { | ||
+ | background-color: rgba(255,204,187,1); | ||
+ | border: 0; | ||
+ | box-shadow: none; | ||
+ | z-index: 999; | ||
+ | -webkit-transition: background .5s ease-in-out, opacity .5s ease; | ||
+ | -moz-transition: background .5s ease-in-out, opacity .5s ease; | ||
+ | transition: background .5s ease-in-out, opacity .5s ease; | ||
+ | margin-right: -15px; | ||
+ | } | ||
+ | #custom-nav .dropdown-menu { | ||
+ | border-radius: 0; | ||
+ | border: none; | ||
+ | border-top: 5px solid transparent; | ||
+ | background-color: rgba(255,204,187,1); | ||
+ | -webkit-box-shadow: none; | ||
+ | box-shadow: none; | ||
+ | padding-top: 0; | ||
+ | } | ||
+ | #custom-nav .container { | ||
+ | padding-top: 25px; | ||
+ | padding-bottom: 25px; | ||
+ | -webkit-transition: padding-top .5s ease, padding-bottom .5s ease; | ||
+ | -moz-transition: padding-top .5s ease, padding-bottom .5s ease; | ||
+ | transition: padding-top .5s ease, padding-top .5s ease, padding-bottom .5s ease; | ||
+ | } | ||
+ | #custom-nav.affix { | ||
+ | top: 0; | ||
+ | min-width: 100%; | ||
+ | background-color: rgba(255,204,187,0.7); | ||
+ | /* opacity: 0.9; */ | ||
+ | -webkit-transition: background .5s ease-in-out, opacity .5s ease; | ||
+ | -moz-transition: background .5s ease-in-out, opacity .5s ease; | ||
+ | transition: background .5s ease-in-out, opacity .5s ease; | ||
+ | margin-right: 15px; | ||
+ | } | ||
+ | @media screen and (max-width: 767px){ | ||
+ | #wrapwrap { | ||
+ | padding-top: 50px; | ||
+ | } | ||
+ | .navbar-fixed-top { | ||
+ | z-index: 999; | ||
+ | } | ||
+ | } | ||
/* navbar */ | /* navbar */ | ||
− | .navbar-default { | + | /*.navbar-default { |
background-color: #FFCCBB; | background-color: #FFCCBB; | ||
− | border-color: #E7E7E7; | + | border-color: #E7E7E7;*/ |
} | } | ||
/* Title */ | /* Title */ | ||
Line 162: | Line 211: | ||
</style> | </style> | ||
− | + | <script> | |
+ | $(window).scroll(function() { | ||
+ | if ($(".navbar").offset().top > 50) { | ||
+ | $('#custom-nav').addClass('affix'); | ||
+ | $(".navbar-fixed-top").addClass("top-nav-collapse"); | ||
+ | } else { | ||
+ | $('#custom-nav').removeClass('affix'); | ||
+ | $(".navbar-fixed-top").removeClass("top-nav-collapse"); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
</head> | </head> | ||
<body> | <body> |
Revision as of 12:16, 16 October 2018