Try it:
https://jsfiddle.net/L4cbfsnx/1/
範例程式碼:
HTML:
<div class="dropdown" style='margin: 15px;'>
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
Test Menu
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.ithome.com.tw/node/50343" target='_blank'>「懶」出生產力是程式人很重要的美德</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://tw.voicetube.com/v3/videos/22510" target='_blank'>我衰爆了!都是你的錯!</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://tw.piliapp.com/transit-maps/" target='_blank'>交通地圖</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://blog.niclin.tw/2019/08/26/how-to-be-a-bad-developer/" target='_blank'>如何讓自己成為失敗的軟體工程師 « Nic Lin's Blog</a></li>
</ul>
</div>
JS include:
1. https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css
2. https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
3. https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js
About Me
Blog Rss
Photo
Guestbook
請先 登入 以發表留言。