3D hover effects in web design are interactive design elements that create a sense of depth and dimensionality when a user hovers over or interacts with them. These effects utilize CSS (Cascading Style Sheets) by achieve the 3D effect.
-
3D Transforms
: CSS transforms likerotateX
,rotateY
, androtateZ
can be used to create a 3D rotation effect on an element when hovered. For example, a card flipping effect when the user hovers over it. -
Box Shadow and Depth
: Using CSS box-shadow property with appropriate values can give the illusion of depth, creating a 3D effect when an element is hovered. -
Scale and Zoom
:Scaling
an element slightly when hovered can simulate a 3D zoom effect, giving the appearance of an object coming towards the viewer. -
Perspective and Depth
: Utilizing CSSperspective
andtransform-style
properties, you can create a sense of depth within a 3D space, enhancing the hover effect.
- Add this CSS link in between
<head>
and</head>
. for access the icons from cdnjs. and please chack letest version before adding the link inhead
part. - i am using
font-awesome/6.4.0
version.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
- search the icons
font awesome
SEARCH ICON