Integrating CSS star rating into an HTML form

后端 未结 6 853
梦如初夏
梦如初夏 2020-12-02 15:09

I\'ve seen a tutorial online - http://www.htmldrive.net/items/show/402/CSS-Star-Rating-System - for making a CSS star rating system.

On the page they have this code

6条回答
  •  情书的邮戳
    2020-12-02 15:27

    Here is the solution.

    The HTML:

    The CSS:

    .rating {
      unicode-bidi: bidi-override;
      direction: rtl;
    }
    .rating > span {
      display: inline-block;
      position: relative;
      width: 1.1em;
    }
    .rating > span:hover:before,
    .rating > span:hover ~ span:before {
       content: "\2605";
       position: absolute;
    }
    

    Hope this helps.

    Source

提交回复
热议问题