<style>

.container
{
}

.container {
  position: relative;
  width: 100%;
  float:right;
  border:0px solid #000;
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  opacity: 0.0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  transition: 0.9s ease;
  float:right;
}

.container:hover .overlay {
  opacity: 0.8;
}

.text {
  white-space: nowrap; 
  color: black;
  text-decoration: none;
  font-size: 20px;
  position: absolute;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  text-align: center;
  line-height: 150%;
  float:none;
  border:0px solid #000;
}

.container2 {
  position: relative;
  width: 100%;
  float:right;
  border:0px solid #ccc;
}

.overlay2 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  opacity: 1.0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border:0px solid #ccc;
}

.text2 {
  white-space: nowrap; 
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  position: absolute;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  text-align: center;
  line-height: 100%;
  float:none;
  border:0px solid #000;
  opacity: 0.0;
  transition: 0.9s ease;
}

.container2:hover .text2 {
  opacity: 1.0;
}

</style>