Home > front end >  How to implement the CSS, please?
How to implement the CSS, please?

Time:10-02



As shown in picture, click on the red, don't click touch when gray, how to implement, and he is the background color is full of the whole frame,

CodePudding user response:

Click change red is the click event of js element to add a class (and removing the sibling elements of class)
Don't click when touching the grey with CSS: hover pseudo class

CodePudding user response:

reference 1/f, the sky wave response:
click change red is the click event of js element to add a class (and removing the sibling elements class)
Don't click when touching the grey with CSS: hover pseudo class


How to implement the code! Will use JS??? No wonder, I always turn the CSS reference books,,, can I give the code?

CodePudding user response:

reference 1/f, the sky wave response:
click change red is the click event of js element to add a class (and removing the sibling elements class)
Don't click when touching the grey with CSS: hover pseudo class
fixed, thank god, there is no JS

CodePudding user response:


No js, use radio buttons and hidden: checked pseudo-classes can also

CodePudding user response:

references 4 floor sky waves reply:
no js, use radio buttons and hidden: checked pseudo class can also
don't have to, with pseudo class with respect to OK
  • Related