Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9015299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:43:01+00:00 2026-06-16T03:43:01+00:00

I am trying to make a star rating type system and am working on

  • 0

I am trying to make a star rating type system and am working on the css part only at the minute. I’ve done so that the stars are replaced with lit up ones using a background image in css through background image like this:

.hover-stars:hover{
    background-image: url(http://www.softwares.com/img/icons/favorites.png);
    background-repeat: no-repeat;       
}

What i want to try and do know is implement an after hover affect, so the image stays there once the user has hovered over it. and if possible undo that if the user should re-hover over it a second time. to create the illusion the stars are following the users mouse trail.

I’ve tried this but it just doesn’t work.

.hover-stars:hover:after{
    background-image: url(http://www.softwares.com/img/icons/favorites.png);
    background-repeat: no-repeat;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:43:02+00:00Added an answer on June 16, 2026 at 3:43 am

    The :after selector inserts content after the element. So that wouldn’t be the correct way of using it. I don’t believe what you are looking for can be done with CSS. You can look into jQuery to do the trick for you, by adding or removing classes to the element on hover. For example…

    $(".hover-stars").hover(
    function () { $(this).addClass(".hover-star-after")
    });​
    

    And then add the extra CSS classes you want to add…

    .hover-stars-after {
    background-image: url('http://www.softwares.com/img/icons/favorites.png');
    background-repeat: no-repeat;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a star rating system and i can't get to insert
I'm making a mobile web app and am trying to make a star rating
I'm trying to make a Rating System for my Forum and so I work
I'm trying to make use of the Star Rating component from PrimeFaces. However, it
I'm trying make an entity with doctrine that has three associations with other entities
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to make a small countdown timer in my app but it's not working.
I am trying to make use of a script that uses CPAINT and I
I'm trying to make a basic model of the solar system in Direct X.
I'm trying to create a simple loop that adds a random number of stars,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.