JSFiddle - React, Tailwind, and code Playground

by hamed2020

HTML

<div class='post-body img'>
    
<img border="0" src="https://1.bp.blogspot.com/-FmYIP7q880A/Xj4g-e8PA5I/AAAAAAAABK4/uj5S-1IsCSo7DG2rQLsnOB7QRwlTZaKBgCLcBGAsYHQ/s320/33.png" height="180" width="320" />

CSS

.post-body img {
    border: 5px solid #ccc;
    float: left;
    margin: 15px;
    -webkit-transition: margin 0.5s ease-out;
    -moz-transition: margin 0.5s ease-out;
    -o-transition: margin 0.5s ease-out;
    background:#fff;
  position:fixed;
  z-index:5;
    top:40%;
    left:30%;
}
.post-body img:hover {
    margin-top: 2px;
    background:#fff;
  position:fixed;
  z-index:5;
    top:40%;
    left:30%;
}