JSFiddle - React, Tailwind, and code Playground
HTML
<div> Hello !
<span> <img src="http://www.ledr.com/colours/cyan.jpg" />I want : <br/> to be center.</span>
</div>
CSS
div {
height:200px;
width:200px;
text-align:center;
background:cyan;
position:absolute;
}
span {
height:inherit;
width:inherit;
position:absolute;
left:0;
background: yellow;
text-align:center
}
img {
height:100%;
vertical-align:middle;
width:3px;}
}
JavaScript
$("div").hover(function(){
$("span").css("opacity","0");
},function(){
$("span").css("opacity","1");
});