一、实现效果如下:
二、代码如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>多选</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
}
a {
text-decoration: none;
}
li {
list-style: none;
}
#select {
width: 300px;
height: 40px;
background: violet;
position: relative;
margin: 100px auto;
padding-top: 10px;
box-sizing: border-box;
}
#select:hover #list {
display: