z-index not working on element with smoothscrolling , gSAP

I am not able to show the fixed button when scrolling over images, i tried different things but nothing seems to work even if i z-index:999999999999999;

Image uses smooth scrolling with gsap, now sure what should be change or if z-index property doesnt work with transform: translate(-50%, -50%)..... property which changes for image wrapper when scrolling

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>const select = e => document.querySelector(e);
const selectAll = e => document.querySelectorAll(e);
const panels = selectAll(".panel")
function startAnim() {
panels.forEach((panel, i) => {
let imageWrappers = panel.querySelectorAll(".col__image-wrap")
console.log(imageWrappers)
gsap.fromTo(imageWrappers, {
y: "-30vh"
}, {
y: "30vh",
scrollTrigger: {
trigger: panel,
scrub: true,
start: "top bottom", // position of trigger meets the scroller position
},
ease: 'none'
})
})
}
function init() {
startAnim();
}
window.onload = () => init()
const lenis = new Lenis()
lenis.on('scroll', (e) => {
console.log(e)
})
function raf(time) {
lenis.raf(time)
requestAnimationFrame(raf)
}
requestAnimationFrame(raf)</code>
<code>const select = e => document.querySelector(e); const selectAll = e => document.querySelectorAll(e); const panels = selectAll(".panel") function startAnim() { panels.forEach((panel, i) => { let imageWrappers = panel.querySelectorAll(".col__image-wrap") console.log(imageWrappers) gsap.fromTo(imageWrappers, { y: "-30vh" }, { y: "30vh", scrollTrigger: { trigger: panel, scrub: true, start: "top bottom", // position of trigger meets the scroller position }, ease: 'none' }) }) } function init() { startAnim(); } window.onload = () => init() const lenis = new Lenis() lenis.on('scroll', (e) => { console.log(e) }) function raf(time) { lenis.raf(time) requestAnimationFrame(raf) } requestAnimationFrame(raf)</code>
const select = e => document.querySelector(e);
const selectAll = e => document.querySelectorAll(e);

const panels = selectAll(".panel")

function startAnim() {
  
  panels.forEach((panel, i) => {
    let imageWrappers = panel.querySelectorAll(".col__image-wrap")
    console.log(imageWrappers)
    
    gsap.fromTo(imageWrappers, {
      y: "-30vh"
    }, {
      y: "30vh",
      scrollTrigger: {
        trigger: panel,
        scrub: true,
        start: "top bottom", // position of trigger meets the scroller position
      },
      ease: 'none'
    })
  })
}

function init() {
  startAnim();
}

window.onload = () => init()



const lenis = new Lenis()

lenis.on('scroll', (e) => {
  console.log(e)
})

function raf(time) {
  lenis.raf(time)
  requestAnimationFrame(raf)
}

requestAnimationFrame(raf)
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>.enquire-btn{ background-color: #222; color: #fff; min-width:150px;
padding:10px 25px; border-radius: 100px; text-decoration: none;
font-weight: normal; font-size: 14px;
position: -webkit-sticky;
position: sticky;
position:fixed;
z-index:99999999999999999999;
}
body{background:#fff;}
.header{hight:60px; min-height:60px; background:#fff; ;
}
.h-line{height:1px; background:#000; margin-top:15px; }
.hero-section{margin-top:200px; z-index:20;}
.hs {
text-transform: uppercase;
font-family:Overusedgrotesk,sans-serif;
color:#222;
font-weight:200;
letter-spacing: -5px;
font-size: clamp(2.1875rem, 0.9037rem + 5.4054vw, 9.6875rem);
}
.hs:first-child {font-weight:600; padding-right:10px;}
*, .panel, .project {
padding: 0;
margin: 0;
}
/* Full width section */
.panel {
display: flex;
justify-content: center;
align-items: stretch;
height: 90vh;
overflow: hidden;
margin-top: 0vh;
margin-bottom:0vh;
/* background-color: red; */
}
/* In charge of setting the height/width/area */
.column {
flex-basis:100%;
position: relative;
overflow: hidden;
}
/* Extra height for the parallax effect */
.col__image-wrap {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
height: 160vh;
background-color: red;
}
/* make sure it covers the total space */
.img {
object-fit: cover;
width: 100%;
height: 100%;
}
.intro-section{min-height:300px; background:grey; padding:30px 0px;}
.intro-section .section-heading {
position:relative; withd:100%; padding:30px;
color:#fff; font-size:18px;}</code>
<code>.enquire-btn{ background-color: #222; color: #fff; min-width:150px; padding:10px 25px; border-radius: 100px; text-decoration: none; font-weight: normal; font-size: 14px; position: -webkit-sticky; position: sticky; position:fixed; z-index:99999999999999999999; } body{background:#fff;} .header{hight:60px; min-height:60px; background:#fff; ; } .h-line{height:1px; background:#000; margin-top:15px; } .hero-section{margin-top:200px; z-index:20;} .hs { text-transform: uppercase; font-family:Overusedgrotesk,sans-serif; color:#222; font-weight:200; letter-spacing: -5px; font-size: clamp(2.1875rem, 0.9037rem + 5.4054vw, 9.6875rem); } .hs:first-child {font-weight:600; padding-right:10px;} *, .panel, .project { padding: 0; margin: 0; } /* Full width section */ .panel { display: flex; justify-content: center; align-items: stretch; height: 90vh; overflow: hidden; margin-top: 0vh; margin-bottom:0vh; /* background-color: red; */ } /* In charge of setting the height/width/area */ .column { flex-basis:100%; position: relative; overflow: hidden; } /* Extra height for the parallax effect */ .col__image-wrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; height: 160vh; background-color: red; } /* make sure it covers the total space */ .img { object-fit: cover; width: 100%; height: 100%; } .intro-section{min-height:300px; background:grey; padding:30px 0px;} .intro-section .section-heading { position:relative; withd:100%; padding:30px; color:#fff; font-size:18px;}</code>
.enquire-btn{ background-color: #222; color: #fff; min-width:150px; 
  padding:10px 25px; border-radius: 100px; text-decoration: none; 
  font-weight: normal; font-size: 14px;
  position: -webkit-sticky;
  position: sticky;
  position:fixed;
  z-index:99999999999999999999; 
}
body{background:#fff;}
.header{hight:60px; min-height:60px; background:#fff; ;
}
.h-line{height:1px; background:#000; margin-top:15px; }
.hero-section{margin-top:200px; z-index:20;}
.hs {
  text-transform: uppercase;
  font-family:Overusedgrotesk,sans-serif;
  color:#222;
  font-weight:200;
 letter-spacing: -5px;
font-size: clamp(2.1875rem, 0.9037rem + 5.4054vw, 9.6875rem);
}
.hs:first-child {font-weight:600; padding-right:10px;}


*, .panel, .project {
  padding: 0;
  margin: 0;
}

/* Full width section */
.panel {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: 90vh;
  overflow: hidden;
  margin-top: 0vh;
  margin-bottom:0vh;
/*     background-color: red; */
}

/* In charge of setting the height/width/area */
.column {
  flex-basis:100%;
  position: relative;
  overflow: hidden;
}

/* Extra height for the parallax effect */
.col__image-wrap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 160vh;
    background-color: red;
}

/* make sure it covers the total space */
.img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.intro-section{min-height:300px; background:grey; padding:30px 0px;}
.intro-section .section-heading {
  position:relative; withd:100%; padding:30px; 
  color:#fff; font-size:18px;}
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.3/cerulean/bootstrap.min.css" rel="stylesheet"/>
<header class="container-fluid text-center header animate__animated animate__fadeIn animate__delay-800ms">
<div class="row justify-content-evenly vertical-align p-3 ">
<div class="col-4 align-middle">AHRE</div>
<div class="col-4 ms-auto"> <a class="enquire-btn animate__animated animate__fadeInUp animate__slower">CONTACT US</a></div>
</div>
<div class="h-line animate__animated animate__slideInLeft animate__delay-900ms"></div>
</div>
</header>
<section class="container-fluid hero-section">
<span class="hs animate__animated animate__fadeInUp animate__delay-1s">The Residences</span>
</section>
<section class="container-fluid section2 p-0">
<div class="panel panel--1">
<div class="column">
<div class="col__image-wrap">
<img class="img img--1" src="https://assets-global.website-files.com/6594c68e852eed392813f26c/65968d19211871302df255cc_home-img-07.webp" />
</div>
</div>
</div>
</section>
<section class="intro-section">
<div> <span class="section-heading">Introduction</span></div>
</section>
<script src="https://unpkg.com/[email protected]/dist/lenis.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/ScrollTrigger.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js"></script></code>
<code><link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet"/> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.3/cerulean/bootstrap.min.css" rel="stylesheet"/> <header class="container-fluid text-center header animate__animated animate__fadeIn animate__delay-800ms"> <div class="row justify-content-evenly vertical-align p-3 "> <div class="col-4 align-middle">AHRE</div> <div class="col-4 ms-auto"> <a class="enquire-btn animate__animated animate__fadeInUp animate__slower">CONTACT US</a></div> </div> <div class="h-line animate__animated animate__slideInLeft animate__delay-900ms"></div> </div> </header> <section class="container-fluid hero-section"> <span class="hs animate__animated animate__fadeInUp animate__delay-1s">The Residences</span> </section> <section class="container-fluid section2 p-0"> <div class="panel panel--1"> <div class="column"> <div class="col__image-wrap"> <img class="img img--1" src="https://assets-global.website-files.com/6594c68e852eed392813f26c/65968d19211871302df255cc_home-img-07.webp" /> </div> </div> </div> </section> <section class="intro-section"> <div> <span class="section-heading">Introduction</span></div> </section> <script src="https://unpkg.com/[email protected]/dist/lenis.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/ScrollTrigger.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js"></script></code>
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.3/cerulean/bootstrap.min.css" rel="stylesheet"/>

<header class="container-fluid text-center header animate__animated animate__fadeIn animate__delay-800ms">
  <div class="row justify-content-evenly vertical-align p-3 ">
    <div class="col-4 align-middle">AHRE</div>
    <div class="col-4 ms-auto">      <a class="enquire-btn animate__animated animate__fadeInUp animate__slower">CONTACT US</a></div>
</div>
    <div class="h-line animate__animated animate__slideInLeft animate__delay-900ms"></div>
  </div>
</header>
<section class="container-fluid hero-section">
  <span class="hs animate__animated animate__fadeInUp animate__delay-1s">The Residences</span>
</section>
<section class="container-fluid section2 p-0">
   <div class="panel panel--1">
    <div class="column">
      <div class="col__image-wrap">
      <img class="img img--1" src="https://assets-global.website-files.com/6594c68e852eed392813f26c/65968d19211871302df255cc_home-img-07.webp" />
    </div>
    </div>
  </div>
 
 
</section>
<section class="intro-section">
  <div> <span class="section-heading">Introduction</span></div>
</section>

<script src="https://unpkg.com/[email protected]/dist/lenis.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/ScrollTrigger.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js"></script>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật