{"id":21456103,"url":"https://github.com/secretariatv/css-scss","last_synced_at":"2025-07-15T00:30:53.473Z","repository":{"id":169648738,"uuid":"645202356","full_name":"SecretariatV/CSS-SCSS","owner":"SecretariatV","description":"This repo is a project to design and implement various animations including 3D and slider using CSS and SCSS.","archived":false,"fork":false,"pushed_at":"2024-06-17T06:16:10.000Z","size":13234,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-17T07:34:25.117Z","etag":null,"topics":["3d","animation","css","scss"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SecretariatV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-25T06:29:53.000Z","updated_at":"2024-06-17T07:34:28.702Z","dependencies_parsed_at":"2024-06-17T07:44:34.882Z","dependency_job_id":null,"html_url":"https://github.com/SecretariatV/CSS-SCSS","commit_stats":null,"previous_names":["secretariatv/css-scss"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecretariatV%2FCSS-SCSS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecretariatV%2FCSS-SCSS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecretariatV%2FCSS-SCSS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecretariatV%2FCSS-SCSS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SecretariatV","download_url":"https://codeload.github.com/SecretariatV/CSS-SCSS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226002968,"owners_count":17558157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","animation","css","scss"],"created_at":"2024-11-23T05:14:28.964Z","updated_at":"2024-11-23T05:14:29.766Z","avatar_url":"https://github.com/SecretariatV.png","language":"CSS","readme":"# CSS-SCSS\nThis repo is a project to design and implement various animations including 3D and slider using CSS and SCSS.\nAll animations were inspired and implemented by CodePen.\n- [CSS-SCSS](#css-scss)\n  - [Table of contents](#table-of-contents)\n  - [3D Card](#3d-card)\n    - [CSS](#css)\n  - [3D Carousel](#3d-carousel)\n    - [Start Effect](#start-effect)\n    - [Image 3D Effect](#image-3d-effect)\n    - [Mouse Event Effect](#mouse-event-effect)\n  - [3D Card Hover](#3d-card-hover)\n    - [Caption Animation](#caption-animation)\n    - [Image Effect](#image-effect)\n  - [3D Card Effect](#3d-card-effect)\n    - [Add mouse event listener](#add-mouse-event-listener)\n  - [3D Card Effect V2](#3d-card-effect-v2)\n    - [Mouse Event](#mouse-event)\n  - [3D Image Hover](#3d-image-hover)\n    - [Animation](#animation)\n  - [3D Thumb Image Effect](#3d-thumb-image-effect)\n    - [Book Effect](#book-effect)\n    - [Shadow Effect](#shadow-effect)\n  - [Image Caption v1](#image-caption-v1)\n    - [Caption Animation](#caption-animation-1)\n  - [Image Caption v2](#image-caption-v2)\n    - [Caption Animation](#caption-animation-2)\n  - [Image Caption v2](#image-caption-v2-1)\n  - [Border Effect](#border-effect)\n    - [Border Animation](#border-animation)\n    - [Image Effect](#image-effect-1)\n  - [Button Effect (Simple)](#button-effect-simple)\n    - [Line Hover Effect](#line-hover-effect)\n  - [Button Effect (Simple)](#button-effect-simple-1)\n    - [Glow Button](#glow-button)\n      - [Neon Animation](#neon-animation)\n      - [Glow Effect](#glow-effect)\n\n## Table of contents[](#table-of-contents)\n- 3D Card\n\n## 3D Card[](#3d-card)\n\u003cdiv style=\"display:flex;align-items:center;justify-content:center;width:100%;\"\u003e\n  \u003cimg align=\"center\" src=\"/screenshot/3D_Card/screenshot.jpg\" alt=\"3D Card\" style=\"width:50%;height:50%\"/\u003e\n\u003c/div\u003e\nThis project is a project that implements a 3D card using CSS.\n\n### CSS\n```\n.card:hover .wrapper {\n  transform: perspective(900px) translateY(-5%) rotateX(25deg) translateZ(0);\n  box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);\n  -webkit-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);\n  -moz-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);\n}\n```\n\n## 3D Carousel[](#3d-carousel)\n\u003cdiv style=\"display:flex;align-items:center;justify-content:center;\"\u003e\n  \u003cimg align=\"center\" src=\"/screenshot/3D_Carousel/Carousel.jpg\" alt=\"3D_Carousel\" style=\"width:50%;height:50%\"/\u003e\n\u003c/div\u003e\nThis project is a project that implements the image carousel effect using CSS and JavaScript.\n\n### Start Effect\n```\nfor (var i = 0; i \u003c imgs.length; i++) {\n    imgs[i].style.transform = \"rotateY(\" + i * (360 / imgs.length) + \"deg) translateZ(\" + radius + \"px)\";\n    imgs[i].style.transition = \"transform 1s\";\n    imgs[i].style.transitionDelay = delayTime || (imgs.length - i) / 4 + \"s\";\n  }\n```\n\n### Image 3D Effect\n```\nimg {\n  transform-style: preserve-3d;\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  line-height: 200px;\n  font-size: 50px;\n  text-align: center;\n  box-shadow: 0 0 8px #fff;\n  -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, #0005);\n}\n```\n\n### Mouse Event Effect\n```\ndocument.onpointerdown = function (e) {\n  clearInterval(wheel.timer);\n  e = e || window.event;\n  var sX = e.clientX, sY = e.clientY;\n\n  this.onpointermove = function (e) {\n    e = e || window.event;\n    var nX = e.clientX, nY = e.clientY;\n    desX = nX - sX;\n    desY = nY - sY;\n    tX += desX * 0.1;\n    tY += desY * 0.1;\n    applyTransform(wheel);\n    sX = nX;\n    sY = nY;\n  };\n\n  this.onpointerup = function (e) {\n    wheel.timer = setInterval(function () {\n      desX *= 0.95;\n      desY *= 0.95;\n      tX += desX * 0.1;\n      tY += desY * 0.1;\n      applyTransform(wheel);\n      playSpin(false);\n      if (Math.abs(desX) \u003c 0.5 \u0026\u0026 Math.abs(desY) \u003c 0.5) {\n        clearInterval(wheel.timer);\n        playSpin(true);\n      }\n    }, 17);\n    this.onpointermove = this.onpointerup = null;\n  };\n\n  return false;\n};\n```\n\n## 3D Card Hover[](#3d-card-hover)\n\u003cimg align=\"center\" src=\"/screenshot/3D_Card_Hover/Screenshot.jpg\" alt=\"3D Card Hover\" style=\"width:50%;height:50%\"/\u003e\nThis project shows 3D animation using characters.\n\n### Caption Animation\n```\nfigcaption {\n  grid-area: 1/1;\n  width: calc(100% + 40px);\n  font-family: Exoct;\n  color: white;\n  font-size: min(32px, 5vmin);\n  text-align: center;\n  place-self: end center;\n  transform: perspective(500px) translateY(100%) rotateX(-90deg);\n  backface-visibility: hidden;\n  transform-origin: top;\n  background: #000;\n  transition: 0.5s;\n}\n```\n\n### Image Effect \n```\nfigure {\n  width: 100%;\n  aspect-ratio: 1;\n  margin: 0 0 60px;\n  padding: 5px 20px 0;\n  box-sizing: border-box;\n  display: grid;\n  grid-template-rows: 100%;\n  cursor: pointer;\n  position: relative;\n  filter: drop-shadow(0 0 20px rgb(0 0 0/50%));\n}\n\nfigure:before {\n  background-image: url(https://assets.codepen.io/1480814/necro-back.jpg);\n}\n\nfigure + figure:before {\n  background-image: url(https://assets.codepen.io/1480814/druid-bac.jpg);\n}\n```\n\n## 3D Card Effect[](#3d-card-effect)\n\u003cimg align=\"center\" src=\"/screenshot/3D_Card_Effect/3D_Card_Effect.jpg\" alt=\"3D Card Effect\" style=\"width:50%;height:50%\"/\u003e\nThis project is a project that shows a 3D card using mouse events.\n\n### Add mouse event listener\n```\ncontainer.addEventListener(\"mousemove\", (e) =\u003e {\n  let X = (window.innerWidth / 2 - e.pageX) / 30;\n  let Y = (window.innerHeight / 2 - e.pageY) / 30;\n\n  card.style.transition = \"none\";\n  card.style.transform = `rotateX(${X}deg) rotateY(${Y}deg)`;\n});\n```\n\n## 3D Card Effect V2[](#3d-card-effect-v2)\n\u003cimg align=\"center\" src=\"/screenshot/3D_Card_Effect_V2/Screenshot.jpg\" alt=\"3D Card Effect V2\" style=\"width:100%;height:100%\"/\u003e\n\n### Mouse Event\n```\nwindow.addEventListener(\"DOMContentLoaded\", (event) =\u003e {\n  const cards = document.querySelectorAll(\".card\");\n  cards.forEach((e) =\u003e {\n    e.addEventListener(\"mousemove\", (event) =\u003e {\n      const rect = e.getBoundingClientRect();\n      const centerX = (rect.left + rect.right) / 2;\n      const centerY = (rect.top + rect.bottom) / 2;\n      const posX = event.pageX - centerX;\n      const posY = event.pageY - centerY;\n      const x = remap(posX, rect.width / 2, angle);\n      const y = remap(posY, rect.height / 2, angle);\n      e.dataset.rotateX = x;\n      e.dataset.rotateY = -y;\n    });\n\n    e.addEventListener(\"mouseout\", (event) =\u003e {\n      e.dataset.rotateX = 0;\n      e.dataset.rotateY = 0;\n    });\n  });\n\n  const update = () =\u003e {\n    cards.forEach((e) =\u003e {\n      let currentX = parseFloat(\n        e.style.getPropertyValue(\"--rotateY\").slice(0, -1)\n      );\n      let currentY = parseFloat(\n        e.style.getPropertyValue(\"--rotateX\").slice(0, -1)\n      );\n      if (isNaN(currentX)) currentX = 0;\n      if (isNaN(currentY)) currentY = 0;\n      const x = lerp(currentX, e.dataset.rotateX, 0.05);\n      const y = lerp(currentY, e.dataset.rotateY, 0.05);\n      e.style.setProperty(\"--rotateY\", x + \"deg\");\n      e.style.setProperty(\"--rotateX\", y + \"deg\");\n    });\n  };\n  setInterval(update, 1000 / 60);\n});\n```\n\n## 3D Image Hover[](#3d-image-hover)\n\u003cimg align=\"center\" src=\"/screenshot/3D_Image_Hover/3DImageHover.jpg\" alt=\"3D Image Hover\" style=\"width:50%;height:50%\"/\u003e\nThis project implemented multiple sliders animation using CSS.\n\n### Animation\n```\n.container:hover img:nth-child(4) {\n  transform: translate(160px, -160px);\n  opacity: 1;\n}\n\n.container:hover img:nth-child(3) {\n  transform: translate(120px, -120px);\n  opacity: 0.8;\n}\n\n.container:hover img:nth-child(2) {\n  transform: translate(80px, -80px);\n  opacity: 0.6;\n}\n\n.container:hover img:nth-child(1) {\n  transform: translate(40px, -40px);\n  opacity: 0.4;\n}\n```\n\n## 3D Thumb Image Effect[](#3d-thumb-image-effect)\n\u003cimg align=\"center\" src=\"/screenshot/3D_Thumb_Image_Animation/Screenshot.jpg\" alt=\"3D Thumb Effect\" style=\"width:100%;height:100%\"/\u003e\n\n### Book Effect\n```\n.thumb a:after {\n  content: \"\";\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  width: 100%;\n  height: 36px;\n  background: inherit;\n  background-size: cover, cover;\n  background-position: bottom;\n  transform: rotateX(90deg);\n  transform-origin: bottom;\n}\n```\n\n### Shadow Effect\n```\n.thumb a:before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background: rgba(0, 0, 0, 0.5);\n  box-shadow: 0 0 100px 50px rgba(0, 0, 0, 0.5);\n  transition: all 0.5s;\n  opacity: 0.15;\n  transform: rotateX(95deg) translateZ(-80px) scale(0.75);\n  transform-origin: bottom;\n}\n\n.thumb:hover a:before {\n  opacity: 1;\n  box-shadow: 0 0 25px 25px rgba(0, 0, 0, 0.5);\n  transform: rotateX(0) translateZ(-60px) scale(0.85);\n}\n```\n\n## Image Caption v1[](#image-caption-v1)\n\u003cimg align=\"center\" src=\"/screenshot/Image_Caption_v1/Screenshot.jpg\" alt=\"Image Caption v1\" style=\"width:100%;height:100%\"/\u003e\n\n### Caption Animation\n```\nfigure.caption::after {\n  content: \"\";\n  background: #ffffff;\n  width: 100%;\n  height: 100%;\n  position: absolute;\n  left: 0;\n  bottom: 0;\n  opacity: 0.75;\n  transform: skew(-45deg) scaleX(0);\n  transition: 0.3s ease-in-out;\n}\n\nfigure.caption:hover::after {\n  transform: skew(-45deg) scaleX(1);\n  transition: all 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275);\n}\n```\n\n## Image Caption v2[](#image-caption-v2)\n\u003cimg align=\"center\" src=\"/screenshot/Image_Caption_v2/Screenshot.jpg\" alt=\"Image Caption v2\" style=\"width:100%;height:100%\"/\u003e\n\n### Caption Animation\n```\n.caption::before,\n.caption::after {\n  height: 10px;\n  width: 0%;\n}\n\n.caption::before {\n  top: 0;\n  left: 0;\n}\n\n.caption::after {\n  bottom: 0;\n  right: 0;\n}\n\n.caption:hover::before,\n.caption:hover::after {\n  width: 100%;\n}\n```\n\n## Image Caption v2[](#image-caption-v2)\n\u003cimg align=\"center\" src=\"/screenshot/Image_Caption_v3/Screenshot.jpg\" alt=\"Image Caption v3\" style=\"width:100%;height:100%\"/\u003e\n\n\n## Border Effect[](#border-effect)\n\u003cdiv style=\"display:flex;align-items:center;justify-content:center;\"\u003e\n  \u003cimg align=\"center\" src=\"/screenshot/Border_Effect/Screenshot.jpg\" alt=\"Border Effect\" style=\"width:30%;height:30%\"/\u003e\n\u003c/div\u003e\nThis project uses Vanilla CSS to apply a floating border effect to image.\n\n### Border Animation\n```\n@-webkit-keyframes morph {\n  0% {\n    border-radius: 40% 60% 60% 40%/60% 30% 70% 40%;\n  }\n  100% {\n    border-radius: 40% 60%;\n  }\n}\n\n@keyframes morph {\n  0% {\n    border-radius: 40% 60% 60% 40%/60% 30% 70% 40%;\n  }\n  100% {\n    border-radius: 40% 60%;\n  }\n}\n\n.shape {\n  width: 100%;\n  height: 100%;\n  transition: border-radius 1s ease-out;\n  -webkit-animation: morph 8s ease-in-out infinite both alternate;\n  animation: morph 8s ease-in-out infinite both alternate;\n  border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;\n  position: absolute;\n  overflow: hidden;\n  z-index: 5;\n}\n```\n\n### Image Effect\nTo fix the image, the same effect is applied to the image and the border container.\n```\n.bd {\n  width: 120%;\n  height: 120%;\n  position: absolute;\n  left: -10%;\n  top: -10%;\n  background: url(\"img/1.jpg\");\n  background-size: 100%;\n  background-position: center -9%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  animation: spin 12s linear infinite reverse;\n  z-index: 2;\n}\n\n@-webkit-keyframes spin {\n  to {\n    transform: rotate(1turn);\n  }\n}\n\n@keyframes spin {\n  to {\n    transform: rotate(1turn);\n  }\n}\n```\n\n## Button Effect (Simple)[](#button-effect-simple)\n\u003cimg align=\"center\" src=\"/screenshot/Button_Effect_Simple/Screenshot.jpg\" alt=\"Button Effect Simple\" style=\"width:100%;height:100%\"/\u003e\nThis project is collections of simple effects of Button hovers.\n\n### Line Hover Effect\nCSS\n```\nsvg {\n  position: absolute;\n  left: 0;\n  top: 0;\n  fill: none;\n  stroke: #fff;\n  stroke-dasharray: 150 480;\n  stroke-dashoffset: 150;\n  transition: 1s ease-in-out;\n}\n\n.btn-one .btn:hover svg {\n  stroke-dashoffset: -480;\n}\n```\n\nHTML\n```\n\u003csvg\u003e\n  \u003cpolyline class=\"bg-line\" points=\"179,1 179,59 1,59 1,1 179,1\" /\u003e\n  \u003cpolyline class=\"hi-line\" points=\"179,1 179,59 1,59 1,1 179,1\" /\u003e\n\u003c/svg\u003e\n```\n\n## Button Effect (Simple)[](#button-effect-simple)\n\u003cimg align=\"center\" src=\"/screenshot/Button_Effect_Simple/Screenshot.jpg\" alt=\"Button Effect Simple\" style=\"width:100%;height:100%\"/\u003e\nThis project is using Vanilla CSS to 3D effect.\n\n### Glow Button\n\n#### Neon Animation\n```\n@keyframes border-flicker {\n  0% {\n    opacity: 0.1;\n  }\n  2% {\n    opacity: 1;\n  }\n  3% {\n    opacity: 0.1;\n  }\n  8% {\n    opacity: 1;\n  }\n  70% {\n    opacity: 0.7;\n  }\n  100% {\n    opacity: 1;\n  }\n}\n```\n\n#### Glow Effect\n```\n.glowing-btn::before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  filter: blur(1em);\n  background: var(--glow-color);\n  transform: translateY(120%) rotateX(95deg) scale(1, 0.35);\n  pointer-events: none;\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecretariatv%2Fcss-scss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecretariatv%2Fcss-scss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecretariatv%2Fcss-scss/lists"}