<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style media="screen">
body{
color: white;
/* margin: auto ; */
height: 50px;
/* border: 1px solid #4CAF50; */
}
.rating {
display: flex;
flex-direction: row-reverse;
justify-content: center;
}
.rating > input{ display:none;}
.rating > label {
position: relative;
width: 1.1em;
font-size: 15vw;
color: #0063BE;
cursor: pointer;
}
.rating > label::before{
content: "\2605";
position: absolute;
opacity: 0;
}
.rating > label:hover:before,
.rating > label:hover ~ label:before {
opacity: 1 !important;
}
.rating > input:checked ~ label:before{
opacity:1;
/* width: 10px; */
}
.rating:hover > input:checked ~ label:before{ opacity: 0.4; }
</style>
<script>
</script>
</head>
<body>
<form action="#" style="text-align: center;">
<div class="rating">
<input type="radio" name="rating" value="5" id="5" ><label for="5">☆</label>
<input type="radio" name="rating" value="4" id="4" ><label for="4">☆</label>
<input type="radio" name="rating" value="3" id="3" ><label for="3">☆</label>
<input type="radio" name="rating" value="2" id="2" ><label for="2">☆</label>
<input type="radio" name="rating" value="1" id="1" ><label for="1">☆</label>
</div>
<div class="rating">
<textarea id="fb" type="text" placeholder="Enter your feedback" rows="2" cols="50" style="margin: 10px;"></textarea>
</div>
<div class="rating">
<button type="button" class="btn btn-primary">Submit</button>
</div>
</form>
</body>
</html>