0
사용자가 스크롤 할 때 흰색 스타일로 변경하는 것과 같은 추가 스타일로로드되는 고정 된 상단 이동 기능이 있습니다.CSS 변환이 jQuery .addClass 및 .removeClass와 작동하지 않습니다.
변환 CSS 요소가 작동하지 않는 문제가 있습니다. 내가 원하는 것처럼 움직이지 않습니다. Slack에서 동일한 nav 스타일을 복제하고 싶습니다. https://slack.com/customers
아래 jQuery와 CSS가 있습니다.
nav.top {
position: fixed;
top: 0;
width: 100%;
height: 70px;
z-index: 99;
-webkit-transform: translate3d(0,0,0);
-moz-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
.fixed {
-webkit-transform: translate3d(0,-80px,0);
-moz-transform: translate3d(0,-80px,0);
-ms-transform: translate3d(0,-80px,0);
transform: translate3d(0,-80px,0);
background: #fff;
box-shadow: 0 1px 1px rgba(0,0,0,.1);
}
nav.top ul {
list-style-type: none;
margin: 0 20px 0 0;
padding: 0;
float: right;
line-height: 4.375rem;
}
nav.top ul li {
display: inline-block;
}
nav.top ul a.btn_sticky {
color: #404B55;
box-shadow: inset 0 0 0 2px #404b55;
}
nav.top ul a {
color: #404B55;
text-decoration: none;
display: inline-block;
font-size: .9375rem;
font-weight: 700;
margin-left: 9px;
position: relative;
cursor: pointer;
line-height: 1em;
padding: 8px 7px 9px;
border-radius: 5px;
opacity: .8;
}