How can I add CSS of an Image to stand on a surface floor like a 3d

HTQ

I want to make a floor and the cartoons should be placed above the floor as it is a 3d, The floor has a grid in which every cartoon is placed. I don't want to change the floor axis or grid axis, it should be same as now, just I want the images and text in every grid element to be at 90 degree against the grid and floor position so that It can be look like a 3d.

I have attached an image to explain what I want, currently it shows output as in RED section in image, But I want output exactly as the yellow section that I made from photoshop.
Please see this image for the Output I want

Code Snippet

body {
  background-color: #2ee5a2;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  perspective: 10em;
  perspective-origin: 50% calc(50% - 2em);
  overflow: hidden;
}

.chatcontainer {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  grid-template-rows: repeat(7, 30px);
  gap: 60px;
  margin: 10%;
  background-color: #aa69e7;
  border: 1px solid;
  transform: rotateY(0deg) rotateX(63deg);
}

.chatcontainer div img {
  width: 50px;
}

.grid-element {
  max-width: 500px;
  transform: rotateY(0deg) rotateX(327deg);
  /* top: 2em; */
}

.usernamelink {
  color: #fafafa;
  text-decoration: none;
  bottom: 17px;
  position: absolute;
  transform: perspective(739px) rotateY(0deg) rotateX(327deg);
}
<div class="chatcontainer" id="chatcontainer">
  <div class="static grid-element">
    <img class="animatedGiff" src="https://s.cdpn.io/3/pacman-ghost-hi_1.png">
    <span>
    <b>
      <a class="usernamelink" href="" target="_blank">username</a>
    </b>
    </span>
  </div>
  <div class="static grid-element">
    <img class="animatedGiff" src="https://s.cdpn.io/3/pacman-ghost-hi_1.png">
    <span>
    <b>
      <a class="usernamelink" href="" target="_blank">username</a>
    </b>
   </span>
  </div>
</div>

Bita

To make an image appear as if it is standing on a surface floor in CSS, you can use CSS transforms and perspective. Here is an example of how to achieve this effect:

.image-container {
  perspective: 1000px;
  transform-style: preserve-3d;
}

img {
  width: 300px;
  /* adjust as needed */
  height: 200px;
  /* adjust as needed */
  transform: rotateX(45deg);
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.5);
  /* add a shadow to give it more depth */
}
<div class="image-container">
  <img src="your-image-url.jpg" alt="Your Image">
</div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I create a 3D surface from 3D points in Three.js?

How can I add a 3d object as a marker on Google Maps like Uber does

How can i make my background look like the one in the image in css3?

How can i plot my image in 3D?

Arcore: How can I get the dimensions of an image that I placed on the surface?

How can I add inside box-shadow to an image in css?

How can I interpolate missing values (undefined areas) of a 3D surface plot (2D array) using Python?

ThreeJs : How can i add Tetrahedron geometry to the surface

How to add a background image to a floor planner?

How can I position an image like this?

How can I shape an image like an svg?

How can i create CSS Border like this?

how can i make you like this in center and background image? css bootsrap

How can I have stuff like textboxes or buttons on an image as background in css?

How can I convert a 2d image stack into a 3d model while maintaining color?

How can I reshape a 3D nii gz image array to a 2D?

How can I obtain all 2D slices from a 3D image at once?

How can we draw 3D bulding structure from existing image Jquery,Css?

How can I add array1 (2D) to array2 (3D)?

Three.js: Can I update the 3D object in WebGL only in few cases like texture add or mouse move?

how to add a caption like text under image in css

How do I add a background image in CSS?

How can I replace a Label for an image just with css3?

how can I use pygame to surface a image with a title text on top of the image?

How to get the position of 2D dicom image slice in 3D surface rendered output in vtk

How to project a 2D image as a surface in a 3D scatter plot (in R)?

How can I create a 3D illusion by moving the background image layer when scrolling (Parallax effect)?

How can I change all specific values of a image (3D NumPy array) at once in python?

How I can animate this diamond image so it looks as 3d diamond is rotating downward?