sách gpt4 ăn đã đi

html - 使用 css 宽度仅填充 60% 的星号

In lại 作者:太空狗 更新时间:2023-10-29 13:24:58 27 4
mua khóa gpt4 giày nike

当我尝试 style=width:60% đến .đánh giá 类时,金色应该只填充 3 颗星,其余的星应该是空白的,但它不起作用。请帮助我我的错误是什么?

我的 html 代码:










我的CSS代码:

.star{ width:200px; position: relative;color: #bdbdbd;}

.rating span
{
font-size:30px;
margin-left:-4px;
white-space: nowrap;
tràn: ẩn;
}

.rating span:before {
content:"\2605";
vị trí: tuyệt đối;
color:gold;
}

检查 fiddle link

câu trả lời hay nhất

这是我以前用过的。这非常有效 - 你甚至可以填充一小部分星星......

https://jsfiddle.net/4qqspqxh/

.ratings {
vị trí: tương đối;
vertical-align: middle;
hiển thị: khối nội tuyến;
color: #b1b1b1;
tràn: ẩn;
}

.full-stars{
vị trí: tuyệt đối;
trái: 0;
trên cùng: 0;
white-space: nowrap;
tràn: ẩn;
color: #fde16d;
}

.empty-stars:before,
.full-stars:before {
content: "\2605\2605\2605\2605\2605";
font-size: 14pt;
}

.empty-stars:before {
-webkit-text-stroke: 1px #848484;
}

.full-stars:before {
-webkit-text-stroke: 1px orange;
}

/* Webkit-text-stroke is not supported on firefox or IE */
/* Firefox */
@-moz-document tiền tố url() {
.full-stars{
color: #ECBE24;
}
}
/* IE */



关于html - 使用 css 宽度仅填充 60% 的星号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33858426/

27 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress