Design Star with CSS

 

Design Star with CSS


Font Awesome CDN Link - https://www.bootstrapcdn.com/fontawesome/

Font Awesome Icon Link - https://fontawesome.com/v4.7.0/icon/star


HTML - 

<!DOCTYPE html>

<html>

<head>

<title>Star</title>

<link rel="stylesheet" type="text/css" href="style.css">

<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

</head>

<body>


<i class="fa fa-star" aria-hidden="true"></i>

<i class="fa fa-star" aria-hidden="true"></i>

<i class="fa fa-star" aria-hidden="true"></i>

<i class="fa fa-star" aria-hidden="true"></i>

<i class="fa fa-star" aria-hidden="true"></i>


</body>

</html>



CSS - 

*{

margin: 0;

padding: 0;

box-sizing: border-box;

}

body{

height: 100vh;

display: flex;

justify-content: center;

align-items: center;

background-color: #333;

}

.fa-star{

color: rgb(230,230,230);

margin: 40px;

font-size: 150px !important;

cursor: pointer;

text-shadow: 0 0 15px #25CCF7,

0 0 30px #25CCF7,

0 0 45px #25CCF7,

0 0 60px #25CCF7;

}

.fa-star:hover{

color: white;

transform: translateY(-5px);

}


Thank You

Comments