I have a map like who is mapped by coords:
<img id="mapImage" src="https://i.imgur.com/Y7HuHDQ.png" usemap="#image-map">
<map name="image-map">
<area class="tooltip" target="" alt="USA" title="USA" href="" coords="110,140,182,141,186,148,198,146,198,140,214,139,224,134,234,143,221,150,213,154,205,156,205,170,199,174,194,181,193,188,162,182,158,171,149,173,145,179,141,170,124,168,121,173,112,168,105,158" shape="poly">
<area target="" alt="MEXICO" title="MEXICO" href="" coords="124,172,137,171,141,178,152,173,160,181,162,204,179,199,179,211,157,212,173,216,146,204,136,196,125,188" shape="poly">
<area target="" alt="JAPAN" title="JAPAN" href="" coords="705,106,716,106,721,146,687,184,667,175" shape="poly">
<area target="" alt="GERMANY" title="GERMANY" href="" coords="418,111,436,108,433,124,418,124" shape="poly">
</map>
I want to set information tooltip on hover with css like this but it no works:
<style>
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
/* Position the tooltip */
position: absolute;
z-index: 1;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
</style>
I want it to set information like:
Country: USA Shops: Manchester,TN - Num: 6621418372 WIXOM ,MI - Num:662728173
How can I achieve that? Regards
Country: USA Shops: Manchester,TN - Num: 6621418372 WIXOM ,MI - Num:662728173Where does this information come from? It does not seem to be anywhere in the code you posted (except for the country)