How to use Star rating of Font-awesome with Django?

后端 未结 11 1900
挽巷
挽巷 2020-12-23 17:37

Fontawesome has a great star rating css extension, which looks really awesome.

However clicking on any of the span elements wouldn\'t really do anything. I don\'t

11条回答
  •  北海茫月
    2020-12-23 17:52

    Consider Star Ratings With Very Little CSS from CssTricks. It uses no images, no Bootstrap, no Javascript. Pure CSS and Unicode stars, see this. Supported by all browsers except IE <= 6.

    Note: Javascript is not required for UI, but is required for sending data to the server and preserving the rating selection after the element loses focus.

    Also take a look at Accessible star rating widget with pure CSS. It is a pure CSS as well. Uses a technique discussed here - Custom radio and checkbox inputs using CSS. It's different from the first one in a way that the rating stays selected after the element loses the focus. Unfortunately, it is supported by fewer browsers.

    A quick note on CSS Selectors might be useful while reading that.

    UPDATE:

    Have just reread the post and clicked the link. The first link in my answer is the same as topic starter's. Apologies.

    Anyway, I chose not to delete the answer, as it contains a few links which I've been very glad to find and which might be useful for others.

提交回复
热议问题