6.Cara membuat Overlay title

- img_avatar.png





               

 Kode Program

<!Doctype html>

<html>

<head>

<title>Overlay dTitle</title>

<style>

* {

box-sizing: border-box;

}

.container {

  position:relative;

  width: 300px;

}

.image {

display: block;

  width: 100%;



}

.overlay {

  position:absolute;

  bottom :0;  

  background: rgba(0, 0, 0, 0.5); /* Black see-through */

  width: 100%;  

  color: white;

  font-size: 20px;

  padding: 20px;

  text-align: center;

  transition: .5s ease;

  opacity:0;

  cursor:pointer;

  

}

.container:hover .overlay {

  opacity: 1;


}

</style>

</head>

<body>


<center>

<h2>Gambar Overlay Title</h2>

<p>Silahkan arahkan kursor ke gambar dibawah ini</p>


<div class="container">

  <img src="img_avatar.png" class="image">

  <div class="overlay">Sance Channel</div>

</div>


</center>

</body>

</html>

6.Cara membuat Overlay title 6.Cara membuat Overlay title Reviewed by Leo on 07:10 Rating: 5

No comments