网页鼠标晃动展示提示信息

一、在头部添加

<style type="text/css">

/*Tooltips*/

.tooltips{

 position: relative; /*这个是关键*/

 z-index: 1020;

 border-radius: 12px;

}

.tooltips:hover{

z-index:1020;

background:none; /*没有这个在IE中不可用*/

}

.tooltips divs{

display: none;

position:relative;

}

.tooltips:hover divs{ /*span 标签仅在 :hover 状态时显示*/

 display: block;

 position: absolute;

 top: 90%;

 right: 10%;

 border-radius: 12px;

 border-color: rgb(0,51,0);

 border-width: thin;

 background-color: rgb(255,255,204);

}

-->

</style>

二、在正文添加

    然后在body中鼠标晃动展示的地方的clasa改为:tooltips,并在内部添加一个divs,这个相当于一个div,最后在其中添加要显示的内容。完美……

posted @ 2020-03-21 12:39  MMCDLONG  阅读(166)  评论(0编辑  收藏  举报