By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
LahbabiGuideLahbabiGuide
  • الرئيسية
  • مزيج مِن أفكاري
    • مقالاتي
    • قصص قصيرة
    • سيناريوهات أفلام قصيرة
    • نصوص مسرحية قصيرة
  • أفكار المشاريع
  • قصص النجاح
  • أخبار تقنية
  • القرأن الكريم
Search
  • Advertise
© 2022 Zakariaelahbabi.com . Company. All Rights Reserved.
Reading: Direction Aware Hover Effect Using Pure CSS | According Mouse Direction
Share
Notification Show More
Latest News
bootstrap-clean-buttons-with-hover-effect-|-plain-button-ui-kit
Bootstrap Clean Buttons With Hover Effect | Plain Button UI Kit
Bootstrap
bootstrap-datatable-with-sort,-pagination,-and-search-|-sorting-data-table
Bootstrap Datatable With Sort, Pagination, and Search | Sorting Data Table
Bootstrap
upload-image-in-php-with-mysql-database-|-web-dev-trick
Upload Image In PHP With MySQL Database | Web Dev Trick
PHP
bootstrap-tooltip-progress-bar-animation-|-percentage-values-in-tooltip
Bootstrap Tooltip Progress Bar Animation | Percentage Values in Tooltip
Bootstrap
php-age-calculator-program-|-calculate-age-in-php
PHP Age Calculator Program | Calculate Age In PHP
PHP
Aa
LahbabiGuideLahbabiGuide
Aa
  • مزيج مِن أفكاري
  • أخبار تقنية
  • تطوير الويب
  • أفكار المشاريع
Search
  • Home
    • Home 1
    • Default Home 2
    • Default Home 3
    • Default Home 4
    • Default Home 5
  • Categories
    • تطوير الويب
    • أخبار تقنية
    • أفكار المشاريع
    • مزيج مِن أفكاري
    • قصص النجاح
  • Bookmarks
  • More Foxiz
    • Sitemap
Follow US
  • Advertise
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
direction-aware-hover-effect-using-pure-css-|-according-mouse-direction
LahbabiGuide > تطوير الويب > HTML > Direction Aware Hover Effect Using Pure CSS | According Mouse Direction
HTML

Direction Aware Hover Effect Using Pure CSS | According Mouse Direction

admin
Last updated: 2023/03/11 at 7:37 صباحًا
By admin
Share
8 Min Read
SHARE

/* Code By Webdevtrick ( https://webdevtrick.com ) */

:root {

  –offset: 1rem;

}

*, *:before, *:after {

  box-sizing: border-box;

}

header {

  padding: 1rem;

  font-family: ‘Odibee Sans’, cursive;

  font-size: 2em;

}

h1 {

  margin-top: 0;

  color: #212121;

}

@media (min-width: 40em) {

  body {

    display: grid;

    grid-template-columns: 1fr 3fr;

  }

}

img,

a {

  display: block;

  height: 100%;

}

img {

  max-width: 100%;

  width: 100%;

  object-fit: cover;

}

.grid {

  display: grid;

  grid-gap: 0;

  overflow: hidden;

  list-style: none;

  margin: 0;

  padding: 0;

  height: 100vh;

}

.grid li {

  position: relative;

}

.grid li:hover ~ li:last-child:after,

.grid li:last-child:hover:after,

.grid li:hover ~ li:last-child:before,

.grid li:last-child:hover:before {

  opacity: 1;

  transition: 1s ease;

}

.grid li:last-child:after,

.grid li:last-child:before {

  content: “”;

  position: absolute;

  width: 100%;

  height: 100%;

  top: 0;

  pointer-events: none;

  clip-path: polygon(var(–offset) var(–offset), var(–offset) calc(100% – var(–offset)), calc(100% – var(–offset)) calc(100% – var(–offset)), calc(100% – var(–offset)) var(–offset));

  -webkit-clip-path: polygon(var(–offset) var(–offset), var(–offset) calc(100% – var(–offset)), calc(100% – var(–offset)) calc(100% – var(–offset)), calc(100% – var(–offset)) var(–offset));

  opacity: 0;

  transition: opacity 1s, transform 1s 1s, background 1s;

}

.grid li:last-child:after {

  mix-blend-mode: multiply;

  background: #aaafc3;

}

.grid li:last-child:before {

  backdrop-filter: grayscale(100%) blur(2px);

  -webkit-backdrop-filter: grayscale(100%) blur(2px);

}

.grid li:nth-child(1):hover ~ li:last-child:after {

  background: #2ab1ce;

}

.grid li:nth-child(2):hover ~ li:last-child:after {

  background: #4267b2;

}

.grid li:nth-child(3):hover ~ li:last-child:after {

  background: #e64786;

}

.grid li:nth-child(4):hover ~ li:last-child:after {

  background: #fd2914;

}

.grid li:nth-child(5):hover ~ li:last-child:after {

  background: #fbb016;

}

.grid li:nth-child(6):hover ~ li:last-child:after {

  background: #6bca6c;

}

.grid li:nth-child(7):hover ~ li:last-child:after {

  background: #173b51;

}

.grid li:last-child:hover:after {

  background: #ff6d34;

}

.grid {

  grid-template-columns: repeat(3, 1fr);

  grid-template-rows: repeat(3, 33.3333333333%);

}

.grid li:last-child:after,

.grid li:last-child:before {

  left: 100%;

  transform: translate3d(-100%, -100%, 0);

}

.grid li:nth-child(1):hover ~ li:last-child:after,

.grid li:nth-child(1):hover ~ li:last-child:before {

  transform: translate3d(-200%, -200%, 0);

}

.grid li:nth-child(2):hover ~ li:last-child:after,

.grid li:nth-child(2):hover ~ li:last-child:before {

  transform: translate3d(-100%, -200%, 0);

}

.grid li:nth-child(3):hover ~ li:last-child:after,

.grid li:nth-child(3):hover ~ li:last-child:before {

  transform: translate3d(0%, -200%, 0);

}

.grid li:nth-child(4):hover ~ li:last-child:after,

.grid li:nth-child(4):hover ~ li:last-child:before {

  transform: translate3d(-200%, -100%, 0);

}

.grid li:nth-child(5):hover ~ li:last-child:after,

.grid li:nth-child(5):hover ~ li:last-child:before {

  transform: translate3d(-100%, -100%, 0);

}

.grid li:nth-child(6):hover ~ li:last-child:after,

.grid li:nth-child(6):hover ~ li:last-child:before {

  transform: translate3d(0%, -100%, 0);

}

.grid li:nth-child(7):hover ~ li:last-child:after,

.grid li:nth-child(7):hover ~ li:last-child:before {

  transform: translate3d(-200%, 0%, 0);

}

.grid li:last-child:hover:after,

.grid li:last-child:hover:before {

  transform: translate3d(-100%, 0%, 0);

}

@media (max-width: 60em) {

  .grid {

    grid-template-columns: repeat(2, 1fr);

    grid-template-rows: repeat(4, 25%);

  }

  .grid li:last-child:after,

  .grid li:last-child:before {

    left: 0%;

    transform: translate3d(-50%, -150%, 0);

  }

  .grid li:nth-child(1):hover ~ li:last-child:after,

  .grid li:nth-child(1):hover ~ li:last-child:before {

    transform: translate3d(-100%, -300%, 0);

  }

  .grid li:nth-child(2):hover ~ li:last-child:after,

  .grid li:nth-child(2):hover ~ li:last-child:before {

    transform: translate3d(0%, -300%, 0);

  }

  .grid li:nth-child(3):hover ~ li:last-child:after,

  .grid li:nth-child(3):hover ~ li:last-child:before {

    transform: translate3d(-100%, -200%, 0);

  }

  .grid li:nth-child(4):hover ~ li:last-child:after,

  .grid li:nth-child(4):hover ~ li:last-child:before {

    transform: translate3d(0%, -200%, 0);

  }

  .grid li:nth-child(5):hover ~ li:last-child:after,

  .grid li:nth-child(5):hover ~ li:last-child:before {

    transform: translate3d(-100%, -100%, 0);

  }

  .grid li:nth-child(6):hover ~ li:last-child:after,

  .grid li:nth-child(6):hover ~ li:last-child:before {

    transform: translate3d(0%, -100%, 0);

  }

  .grid li:nth-child(7):hover ~ li:last-child:after,

  .grid li:nth-child(7):hover ~ li:last-child:before {

    transform: translate3d(-100%, 0%, 0);

  }

  .grid li:last-child:hover:after,

  .grid li:last-child:hover:before {

    transform: translate3d(0%, 0%, 0);

  }

  :root {

    –offset: 0;

  }

}

.description {

  font-family: “Unica One”, sans-serif;

  font-size: 1.25rem;

  position: absolute;

  display: block;

  right: 2rem;

  left: 2rem;

  text-align: center;

  top: 50%;

  width: 60px;

  margin: auto;

  color: white;

  z-index: 100;

  opacity: 0;

  transform: translate3d(0, -50%, 0);

  transition: .3s 0s;

}

li:hover .description {

  opacity: 1;

  transition: .6s .3s;

}

You Might Also Like

Bootstrap Clean Buttons With Hover Effect | Plain Button UI Kit

Bootstrap Datatable With Sort, Pagination, and Search | Sorting Data Table

PHP Age Calculator Program | Calculate Age In PHP

Bootstrap Tooltip Progress Bar Animation | Percentage Values in Tooltip

Generate Random Numbers In PHP | Numbers In Sort By Order

TAGGED: CSS, css hover effect, direction aware, hover, HTML, image, list, pure css, source code
admin مارس 11, 2023
Share this Article
Facebook Twitter Pinterest Whatsapp Whatsapp LinkedIn Tumblr Reddit VKontakte Telegram Email Copy Link Print
Previous Article javascript-progress-clock-|-day,-hour,-minute,-second,-progression JavaScript Progress Clock | Day, Hour, Minute, Second, Progression
Next Article domain-availability-checker-in-php-|-get-source-code Domain Availability Checker In PHP | Get Source Code
Leave a comment Leave a comment

اترك تعليقاً إلغاء الرد

لن يتم نشر عنوان بريدك الإلكتروني. الحقول الإلزامية مشار إليها بـ *

Stay Connected

235.3k Followers Like
69.1k Followers Follow
11.6k Followers Pin
56.4k Followers Follow
136k Subscribers Subscribe
4.4k Followers Follow
- Advertisement -
Ad imageAd image

Latest News

bootstrap-clean-buttons-with-hover-effect-|-plain-button-ui-kit
Bootstrap Clean Buttons With Hover Effect | Plain Button UI Kit
Bootstrap مارس 11, 2023
bootstrap-datatable-with-sort,-pagination,-and-search-|-sorting-data-table
Bootstrap Datatable With Sort, Pagination, and Search | Sorting Data Table
Bootstrap مارس 11, 2023
upload-image-in-php-with-mysql-database-|-web-dev-trick
Upload Image In PHP With MySQL Database | Web Dev Trick
PHP مارس 11, 2023
bootstrap-tooltip-progress-bar-animation-|-percentage-values-in-tooltip
Bootstrap Tooltip Progress Bar Animation | Percentage Values in Tooltip
Bootstrap مارس 11, 2023
//

We influence 20 million users and is the number one business and technology news network on the planet

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

[mc4wp_form id=”847″]

LahbabiGuideLahbabiGuide
Follow US

© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.

Join Us!

Subscribe to our newsletter and never miss our latest news, podcasts etc..

[mc4wp_form]
Zero spam, Unsubscribe at any time.

Removed from reading list

Undo
Welcome Back!

Sign in to your account

Lost your password?