<div id="form-block">
  <form id="myform" methot="get">
  <input type="text" readonly value="Имя">
  <input type="text" readonly value="Отзыв">
  <input type="submit" value="Отправить отзыв">
</form>
<div class="thksmsg">Спасибо за ваш отзыв</div>  
</div>
body {
  background: #5f5f5f;
}
#form-block {
  width: fit-content;
  height: auto;
  margin: 0 auto;
  padding: 20px;
  background: rgba(0,0,0,0.5);
  box-sizing: border-box;
  transition: all 0.5s ease;
}
#form-block form {  
  display: flex;
  flex-direction: column;
  width: 100%;  
}
input {
  padding: 7px 10px;
  margin: 8px 0;
}
input[type="submit"] {
  background: yellow;
  border: 2px solid #b9b90c;
}
.thksmsg {
  width: 100%;
  color: #fff;
  text-align: center;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0;
}
$("#myform").on("submit", function(){
  $("#myform").fadeOut(1000,function(){
$('.thksmsg').fadeTo(1000,1);
}); 
  //$(this).replaceWith("<p>Thanks!</p>").fadeIn('slow');
   return false;
 })

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js