简体   繁体   中英

Stacked picture with hover and tooltip

On github under notifications there are avatars of the involved people. On hover the picture can all be shown. I want this but I don't find it and I don't have the first step to do that. Can somebody help me?

so i wil not show you some code but i tell you what i would do:

  • create the tooltip markup with a Style containing the display: none
  • add a data-id to the tooltip-markup and the img
  • appand the marup to the body
  • calculate the left and top position of the element you will hover
  • add the position to the tooltip
  • add to the img a hover-event in wich you read the data-id find the tooltip with the same data-id and set the visibility to block

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM