cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <div class="wrap">
  <span class="rate rate0"></span>
  <span class="rate rate1"></span>
  <span class="rate rate1-5"></span>
  <span class="rate rate2"></span>
  <span class="rate rate2-5"></span>
  <span class="rate rate3"></span>
  <span class="rate rate3-5"></span>
  <span class="rate rate4"></span>
  <span class="rate rate4-5"></span>
  <span class="rate rate5"></span>
              //レート評価 変数
$starFull: 16px;//星1個の幅
$starHalf: $starFull / 2;//星半分(0.5)の幅

$rate1: $starFull;//星1
$rate1-5: $starFull + $starHalf;//星1.5
$rate2: $starFull * 2;//星2
$rate2-5: ($starFull * 2) + $starHalf;//星2.5
$rate3: $starFull * 3;//星3
$rate3-5: ($starFull * 3) + $starHalf;//星3.5
$rate4: $starFull * 4;//星4
$rate4-5: ($starFull * 4) + $starHalf;//星4.5
$rate5 :$starFull * 5;//星5

  position: relative;
  display: inline-block;
  width: $starFull * 5;
  height: $starFull;
  font-size: $starFull;
    position: absolute;
    top: 0;
    left: 0;
    content: '★★★★★';
    display: inline-block;
    height: $starFull;
    line-height: $starFull;
  color: #ddd;
  color: #ffa500;
  overflow: hidden;
  white-space: nowrap;//これがないと改行されて星の半分(0.5)が表現できなくなる
  width: 0;
  width: $rate1;
  width: $rate1-5;
  width: $rate2;
  width: $rate2-5;
  width: $rate3;
  width: $rate3-5;
  width: $rate4;
  width: $rate4-5;
  width: $rate5;

  width: 80px;
  margin: 0 auto;
Loading ..................