性能
通过帧率: 平均 60 fps,p5 59.9 · 长任务: 0 个,共 0 毫秒,最长 0 毫秒 · 源码 gzip 1.6 KB · 运行时 1.3 KB
unlucky-yak-48MIT单选组Uiverse.io
aguerquin 用纯 HTML 和 CSS 做的单选组。按 MIT 许可从 Uiverse.io 收录,此处为实时预览。
质量报告
等级和分数来自构建或测试时跑过的自动检查。没跑过的项目会标成「未检测」,不会填假数据。
帧率: 平均 60 fps,p5 59.9 · 长任务: 0 个,共 0 毫秒,最长 0 毫秒 · 源码 gzip 1.6 KB · 运行时 1.3 KB
问题 0 · 读屏: 需注意
没有持续动效
无溢出
帧率和长任务是在无界面的 Chromium 里用软件 WebGL 测的,只适合在本站组件之间比较,不代表真机表现。
不适用:静止时没有可见动画;由悬停触发的动画没有测试。
没有 axe-core 违规。

检测于 2026年11月15日 · 数据来自自动脚本,不是手工填写。
按实际尺寸显示。
复制内容以许可声明开头,使用代码时请保留。
<div class="rating">
<input type="radio" id="star5" name="rate" value="5" />
<label title="Excellent!" for="star5">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512">
<path
d="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"
></path>
</svg>
</label>
<input value="4" name="rate" id="star4" type="radio" />
<label title="Great!" for="star4">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512">
<path
d="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"
></path>
</svg>
</label>
<input value="3" name="rate" id="star3" type="radio" />
<label title="Good" for="star3">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512">
<path
d="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"
></path>
</svg>
</label>
<input value="2" name="rate" id="star2" type="radio" />
<label title="Okay" for="star2">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512">
<path
d="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"
></path>
</svg>
</label>
<input value="1" name="rate" id="star1" type="radio" />
<label title="Bad" for="star1">
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512">
<path
d="M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"
></path>
</svg>
</label>
</div>/* From Uiverse.io by aguerquin - Tags: hover, radio, stars, rating */
.rating > label {
margin-right: 4px;
}
.rating:not(:checked) > input {
display: none;
}
.rating:not(:checked) > label {
float: right;
cursor: pointer;
font-size: 30px;
}
.rating:not(:checked) > label > svg {
fill: #666;
transition: fill 0.3s ease;
}
.rating > input:checked ~ label > svg {
fill: #ffa723;
}
.rating:not(:checked) > label:hover ~ label > svg,
.rating:not(:checked) > label:hover > svg {
fill: #ff9e0b;
}
#star1:hover ~ label > svg,
#star1:hover > svg {
fill: #a23c3c !important;
}
#star2:hover ~ label > svg,
#star2:hover > svg {
fill: #99542d !important;
}
#star3:hover ~ label > svg,
#star3:hover > svg {
fill: #9f7e18 !important;
}
#star4:hover ~ label > svg,
#star4:hover > svg {
fill: #22885e !important;
}
#star5:hover ~ label > svg,
#star5:hover > svg {
fill: #7951ac !important;
}
#star1:checked ~ label > svg {
fill: #ef4444;
}
#star2:checked ~ label > svg {
fill: #e06c2b;
}
#star3:checked ~ label > svg {
fill: #eab308;
}
#star4:checked ~ label > svg {
fill: #19c37d;
}
#star5:checked ~ label > svg {
fill: #ab68ff;
}控件 · HTML · CSS · JS
直接改代码,再用控件微调,预览会随输入实时更新。

在线编辑每个组件,用控件微调,下载完整源码,复制进阶提示词。
一次性 $49占位价格
测试模式:不会真实扣款。
免费:预览、复制按钮和课程说明。
灰色星星从你选中的那颗一直到第一颗都变成暖橙色,每颗星还有 Excellent、Good 这样的提示。
商品评价、反馈表单和课程评分。
改选中色 #ffa723、未选色 #666、30px 星星尺寸和 0.3s 填充过渡。
用纯 HTML、CSS 和 JavaScript(不用框架)做一个「五星评分」组件。灰色星星从你选中的那颗一直到第一颗都变成暖橙色,每颗星还有 Excellent、Good 这样的提示。 适用场景:商品评价、反馈表单和课程评分。 开放这些可调项:改选中色 #ffa723、未选色 #666、30px 星星尺寸和 0.3s 填充过渡。 支持浅色和深色主题,遵守 prefers-reduced-motion 并给出静止画面,保证文字清晰、控件可用键盘操作。请写原创代码,不要从付费或受限的组件库复制。
更完整的提示词,包含调参、无障碍和接入步骤。