Plebsite
Trying to get these images (full length screenshots of websites) which scroll down on hoverunknown
plain_text
2 years ago
2.0 kB
5
Indexable
export const products = [ { id: 1, img: "", link: "https://twitter.com/newzealandhodl", }, { id: 2, img: "https://kiwihodl.imgbb.com/", link: "https://twitter.com/newzealandhodl", }, { id: 3, img: "https://ibb.co/zX1rW03", link: "https://twitter.com/newzealandhodl", }, { id: 4, img: "https://ibb.co/zX1rW03", link: "https://twitter.com/newzealandhodl", }, { id: 5, img: "https://ibb.co/984sc7c", link: "https://twitter.com/newzealandhodl", }, { id: 6, img: "https://ibb.co/zX1rW03", link: "https://twitter.com/newzealandhodl", }, ]; /this is the data.js file above/ /product jsx file below/ import React from 'react' import "./product.css" const Product = ({img,link}) => { return ( <div className="p"> <div className="p-browser"> <div className="p-circle"></div> <div className="p-circle"></div> <div className="p-circle"></div> </div> <a href={link} target="_blank" rel="noreferrer"> <img src={img} alt="" className="p-img"/> </a> </div> ); }; export default Product; /product jsx above/ /product css below/ .p { width: 30%; height: 40vh; margin: 20px 10px; border: 2px solid rgb(243, 242, 242); border-radius: 10px 10px 0px 0px; overflow: hidden; } .p-browser { height: 20px; background-color: rgb(243, 242, 242); display: flex; align-items: center; position: sticky; z-index: 2; } .p-circle { width: 6px; height: 6px; border-radius: 50%; margin: 3px; background-color: orange; } .p-img { width: 100%; height: 100%; transition: all 10s ease; /* width: fit-content; height: fit-content; */ } .p:hover .p-img { transform: translateY(-100%); } @media screen and (max-width: 480px) { .p { width: 40%; height: 20vh; } } /product css above/
Editor is loading...