css3 - How to keep divs in a hovered state? -


How can I put my div s permanently once in the hovered state ?

Ideally I need to work with the existing code (if possible), because there are several examples:

  #cover: hover img {opacity: 0 ; -Widk-Infection: all 0.2-in-out; }    

If you are asking to hover over an element, and that element Continue the display after the cursor has been taken away from it, it can not be done in CSS. It should be done with javascript.

After the image and after that, I will create a square for the state.

  .over-to-change {opacity: 0.0; -Widk-Infection: all 0.2-in-out; }. {Opacity: 1.0; }   

Then add some jQuery to change the class after hiding the image.
  $ (document) .ready (function () {$ (".hower-to-change"). mousecenter (function () {$ (this) .addClass ('hovered')   

This should work.

Because CSS is only a markup, it will not actually change the status of HTML or CSS when Should not be immediately specified on the page, but -webkit-transition should work without any extra jquery.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -