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
Post a Comment