I don't think the drop-down menu of Bootstrap4 looks good, but it is very useful, so I used it in the project to beautify it.
Before beautification
https://www.runoob.com/try/try.php?filename=trybs4_dropdown-menu
after beautification
code
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap dropdown</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<style type="text/css">
body{
background: #eee;
}
#app{
width: 200px;
margin:100px auto;
}
#app .dropdown .dropdown-btn{
border:none;
outline: none;
border-radius: 5px;
font-size: 15px;
background: #fff;
color: #666;
}
#app .dropdown .dropdown-menu{
background: #fff;
border: none;
min-width:100px;
}
#app .dropdown .dropdown-menu .dropdown-item:hover{
background: #f8f9fa;
color: #666;
}
#app .dropdown .dropdown-menu .dropdown-item:active{
background: #f8f9fa;
color: #666;
}
</style>
</head>
<body>
<div id="app">
<div class="dropdown">
<button type="button" class="dropdown-btn" data-toggle="dropdown">•••</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Link 1</a>
<a class="dropdown-item" href="#">Link 2</a>
<a class="dropdown-item" href="#">Link 3</a>
</div>
</div>
</div>
</body>
</html>
author
TANKING
If you still want to beautify some of Bootstrap's controls, you can find me (please me for a cup of coffee: WeChat: sansure2016)
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。