skip to Main Content

Html – CSS rotating box on hover with light under cursor

I have the following html file: const container = document.querySelector('.container'); const box = document.querySelector('.box'); const light = document.querySelector('.light'); container.addEventListener('mousemove', moveLight); function moveLight(event) { const containerRect = container.getBoundingClientRect(); light.style.left = event.clientX - containerRect.left + 'px'; light.style.top = event.clientY - containerRect.top +…

VIEW QUESTION

CSS Automatic Grid Items Height

With following HTML <body> <div class="wrapper"> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img src="https://images.unsplash.com/photo-1713877561507-881bf3b1c310?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""></div> <div class="grid-item"><img…

VIEW QUESTION

Html – I Want Two Boxes Side By Side

What am I doing wrong? * { margin: 0; padding: 0; box-sizing: border-box; } #plate { height: 100%; width: 750px; margin: 10px auto; } .sidebar { border-radius: 25px; background: rgba(214, 245, 245, 0.7); text-align: center; align-items: center; float: left; width:…

VIEW QUESTION

CSS Grid Images do not scale

Am I doing something wrong that the css grid command is not scaling the items in my grid? I must be misinterpreting how the minmax value works. .grid { display: grid; align-content: center; justify-content: center; /* flex-shrink: 0; */ grid-template-columns:…

VIEW QUESTION
Back To Top
Search