<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> #DIV{ width: 100px; height: 70px; border: 1px solid #aaaa22; display: none; } </style> </head> <body> <lable onmouseover="document.getElementById(‘DIV‘).style.display=‘block‘;" onmouseout="document.getElementById(‘DIV‘).style.display=‘none‘;"> <input type="checkbox" >自动登录</lable> <div id="DIV">选择需要谨慎</div> </body> </html>
注:lable标签的主要作用就是用来做一个框,鼠标进入这个框,就会显示提示内容,如果没有lable标签,只有当鼠标在按钮上时才显示提示内容。
原文:https://www.cnblogs.com/1322957664qqcom/p/11262744.html