CSS - Set Content of Second Element Using ~ to Title of First -


I am trying to create a tooltip system that uses CSS and has very little javascript. So far I have created a structure which is as follows:

    

I have created many CSS styles so that the tooltip is shown on the spawn hover and the tooltip to the right place based on a little javascript mouse position.

However, I'm having trouble trying to make tooltip content, in which the div is coming up. I have tried to use the following CSS, but it has no effect:

  .tooltip: hover ~ # tooltip-span {display: inline; Material: Atri (title); }   

Is there any content in the subject of the title of the div when using CSS in the Span Element?

Thanks for reading!

With pure CSS, no content: attr (title) Match element sets the content in the title attribute, in your case # tooltip-duration .

In order to get the job you want, you need to go to & lt; Span id = "tooltip-span" & gt; & Lt; / Span & gt; Using javascript.

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 -