Dropdown Styles
<div class="flex flex-wrap gap-6 p-8">
<!-- 基础样式 -->
<div class="relative inline-block text-left">
<button type="button" class="inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50">
Basic Style
<svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
<div class="hidden group-hover:block absolute z-10 mt-2 w-56 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5">
<div class="py-1">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Option 1</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Option 2</a>
</div>
</div>
</div>
<!-- 彩色样式 -->
<div class="relative inline-block text-left">
<button type="button" class="inline-flex justify-center rounded-md px-4 py-2 bg-blue-600 text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
Blue Style
<svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
<div class="hidden group-hover:block absolute z-10 mt-2 w-56 rounded-md bg-blue-50 shadow-lg ring-1 ring-blue-500 ring-opacity-5">
<div class="py-1">
<a href="#" class="block px-4 py-2 text-sm text-blue-700 hover:bg-blue-100">Option 1</a>
<a href="#" class="block px-4 py-2 text-sm text-blue-700 hover:bg-blue-100">Option 2</a>
</div>
</div>
</div>
<!-- 黑暗样式 -->
<div class="relative inline-block text-left">
<button type="button" class="inline-flex justify-center rounded-md px-4 py-2 bg-gray-800 text-sm font-medium text-white hover:bg-gray-700">
Dark Style
<svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
<div class="hidden group-hover:block absolute z-10 mt-2 w-56 rounded-md bg-gray-800 shadow-lg ring-1 ring-black ring-opacity-5">
<div class="py-1">
<a href="#" class="block px-4 py-2 text-sm text-gray-100 hover:bg-gray-700">Option 1</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-100 hover:bg-gray-700">Option 2</a>
</div>
</div>
</div>
<!-- 圆角样式 -->
<div class="relative inline-block text-left">
<button type="button" class="inline-flex justify-center rounded-full px-4 py-2 bg-green-500 text-sm font-medium text-white hover:bg-green-600">
Rounded Style
<svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
<div class="hidden group-hover:block absolute z-10 mt-2 w-56 rounded-xl bg-white shadow-lg ring-1 ring-black ring-opacity-5">
<div class="py-1">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-t-xl">Option 1</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-b-xl">Option 2</a>
</div>
</div>
</div>
</div>
Copied to clipboard