如何为每个元素设置工具提示文本框位置一次?

时间:2018-01-04 19:51:34

标签: html css

这是一个简单的日历,我有几天的工具提示文本框,在悬停时会显示一个描述。但是我为每个工具提示做了位置css:

.newyear .tooltiptext { top:70px;
left:61px; width: 180px;}
.sixjanuar .tooltiptext { top:70px;
left:200px; width: 180px;}
.eightfebruar .tooltiptext { top:90px;
left:145px; width: 200px;}
.tenfebruar:hover .tooltiptext {
    top:95px; width: 200px; left: 195px;
}
.eleventfebruar:hover .tooltiptext {
    top:95px; width: 200px; left: 225px;
}

.twelvefebruar:hover .tooltiptext {
    top:122px; width: 200px; left: 60px;
} 

以下是演示:http://buhehe.de/kalender-2018/

对于每个元素,我可以使用任何技巧来制作工具提示位置一次吗?

0 个答案:

没有答案