Rounded Image

Paris Paris
Avatar
Hello World
overlay https://www.w3schools.com/css/css3_images.asp Exported from Notepad++
<html><head><style> /* simple image img{ border-radius: 8px; border-radius: 50%; } thumbnail img{ border: 1px solid #ddd; border-radius: 4px; padding: 5px; width: 150px; } image as a link img { border: 1px solid #ddd; border-radius: 4px; padding: 5px; width: 150px; } img:hover{ box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5); } transparent image img { opacity: 0.5; } Overlay */ .container { position: relative; width: 50%; } .image { display: block; width: 200px; height: auto; } .overlay { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 200px; opacity: 0; transition: .5s ease; background-color: #008CBA; } .container:hover .overlay { opacity: 1; } .text { color: white; font-size: 20px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); } </style></head><body> <h2>Rounded Image</h2> <img src="images/paris.jpg" alt="Paris" width="300" height="300"> <a target="_blank" href="http://rajats.in"> <img src="images/paris.jpg" alt="Paris" style="width:150px"> </a> <div class="container"> <img src="images/paris.jpg" alt="Avatar" class="image"> <div class="overlay"><div class="text">Hello World</div></div> </div> overlay https://www.w3schools.com/css/css3_images.asp </body></html>