react实现一个星级评分效果代码

代码语言:html

所属分类:星级评分

代码描述:react实现一个星级评分效果代码,使用font-awesome来显示星星。

代码标签: react 星级 评分

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

 
<meta charset="UTF-8">
 
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
 
<style>
body
{
 
background-color: #10375c;
 
margin: 0;
}


.wrapper {
 
display: flex;
 
flex-direction: column;
 
justify-content: center;
 
align-items: center;
 
min-height: 100vh;
}

input
[type="radio"] {
 
display: none;
}

.text {
 
color: #f4f6ff;
 
font-size: 22px;
 
margin-top: 15px;
}

.gray {
 
color: #e4e5e9;
}

.yellow {
 
color: #f3c623;
}

.fa-star {
 
cursor: pointer;
 
margin: 10px;
 
transition: color 300ms;
 
font-size: 50px;
}

@media screen and (min-width: 560px) {
 
.fa-star {
   
font-size: 80px;
 
}
}
</style>



</he.........完整代码请登录后点击上方下载按钮下载查看

网友评论0