js实现右键菜单操作
<!--右键菜单的实现(包括细节)-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
*{
margin: 0;
padding: 0;
}
li{
list-style: none;
}
#menu {
width: 120px;
border: 1px solid #000;
text-align: center;
display: none;
position: absolute;
top: 0;
left: 0;
}
#menu li{
height: 30px;
line-height: 30px;
border-bottom: 1px solid #ccc;
}
#menu li:last-child{
border-bottom: 0;
}
</style>
</head>
<body>
<ul id="menu">
<li>打开</li>
<li>下载</li>
<li>删除</li>
<li>复制<