・CSS(Sass)でレーティング評価の星(★)を表現する方法 | Design Color ・CSSでレート評価(★)を表現してみる - あずまや 画像で今までやっていたのですが、画像使わなくてもできるという感じなので試してみました。原理とか詳しい内容は上記で・・。 .rate { position: relative; display: inline-block; width: 100px; height: 20px; font-size: 20px; } .rate:before, .rate:after { position: absolute; top: 0; left: 0; content: '★★★★★'; display: inline-block; height: 20px; line-height: 20px; } .rate:before { color: #ddd
![CSSだけで星評価(rating star)をつくってみた](https://cdn-ak-scissors.b.st-hatena.com/image/square/aeed38e1f9cb88aa4a438bdb2dc0c20706342d1e/height=288;version=1;width=512/https%3A%2F%2F2.bp.blogspot.com%2F-d9ZdzsavOXk%2FVp-NMZksCMI%2FAAAAAAAAAiM%2FUw8LqrXi8pw%2Fs1600%2Fcss-rating-star01.png)