Live Code Preview

Code Sections

HTML Code

<div class="rating">
  <input value="5" name="rating" id="star5" type="radio" />
  <label title="5 stars" for="star5">
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgOne"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgTwo"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <div class="ombre"></div>
  </label>

  <input value="4" name="rating" id="star4" type="radio" />
  <label title="4 stars" for="star4">
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgOne"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgTwo"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <div class="ombre"></div>
  </label>

  <input value="3" name="rating" id="star3" type="radio" />
  <label title="3 stars" for="star3">
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgOne"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgTwo"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <div class="ombre"></div>
  </label>

  <input value="2" name="rating" id="star2" type="radio" />
  <label title="2 stars" for="star2">
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgOne"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgTwo"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <div class="ombre"></div>
  </label>

  <input value="1" name="rating" id="star1" type="radio" />
  <label title="1 star" for="star1">
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgOne"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <svg
      stroke-linejoin="round"
      stroke-linecap="round"
      stroke-width="2"
      stroke="#000000"
      fill="none"
      viewBox="0 0 24 24"
      height="35"
      width="35"
      xmlns="http://www.w3.org/2000/svg"
      class="svgTwo"
    >
      <polygon
        points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
      ></polygon>
    </svg>
    <div class="ombre"></div>
  </label>
</div>
Views : 52

Resource Name

Star selection

Description

Star selection