placeholder="输入新任务,比如'遛狗'" className="w-full p-2 border rounded-md focus:outline-none focus:ring focus:ring-2 focus:ring-blue-500让输入框聚焦时有个蓝色边框。hover:bg-blue-600让按钮悬停时颜色变深。这些类名直接写在组件里,简单又直观。5. placeholder="输入新任务,比如'遛狗'" className="w-full p-2 border rounded-md focus:outline-none focus:ring
<input type="date" id="startDate" class="w-full p-2 border border-gray-300 rounded-lg focus:<em>ring</em> <input type="date" id="anniversaryDate" class="flex-1 p-2 border border-gray-300 rounded-lg focus:<em>ring</em> anniversaryNameInput" placeholder="纪念日名称(如:恋爱100天)" class="w-full p-2 border border-gray-300 rounded-lg focus:<em>ring</em> text" id="titleInput" placeholder="输入主标题" class="w-full p-2 border border-gray-300 rounded-lg focus:<em>ring</em> label> <select id="fontSelect" class="w-full p-2 border border-gray-300 rounded-lg focus:<em>ring</em>
messageInput" class="flex-1 p-2 border rounded-lg resize-none focus:outline-none focus:ring class="px-6 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 focus:outline-none focus:ring
<input type="text" id="name" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:<em>ring</em> textarea id="message" rows="3" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:<em>ring</em>
calendar-day.other-month { @apply text-gray-300; } .calendar-day.today { @apply ring
"disabled" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring
transition-all duration-200 rounded-[var(--radius-lg)] focus-visible:outline-none focus-visible:ring text-[rgb(var(--surface-dark))] placeholder:text-gray-400 focus:outline-none focus:ring
className="w-full p-3 pr-20 pl-10 rounded-full border border-gray-200 focus:outline-none focus:ring-2
="disabled" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring
placeholder="搜索商品" class="w-64 py-2 px-4 rounded-full border border-gray-300 focus:outline-none focus:ring
sizeClasses[size]} rounded-md transition-all duration-200 hover:opacity-90 focus:outline-none focus:ring
交互状态: <form> <input class="focus:outline-none focus:<em>ring-2</em> focus:ring-purple-600 focus:border-transparent "> <button class="hover:bg-purple-700 focus:outline-none focus:<em>ring-2</em> focus:ring-purple-600 ...
<select id="layoutType" class="w-full p-2 border border-gray-300 rounded-md focus:<em>ring</em>
class="w-full h-40 p-4 border rounded-lg resize-none focus:outline-none focus:ring class="bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 focus:outline-none focus:ring
rounded-lg font-medium transition-all duration-200 transform hover:scale-105 focus:outline-none focus:ring { @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring w-full px-3 py-2 border border-gray-300 rounded-lg appearance-none bg-white focus:outline-none focus:ring
readonly="readonly" :class="[ 'w-full px-3 py-2 border rounded-md focus:outline-none focus:ring
<select id="animationSpeed" class="w-full p-2 border border-gray-300 rounded-lg focus:<em>ring</em>
"readonly" :class="[ 'w-full px-3 py-2 border rounded-md focus:outline-none focus:ring
其实最重要的是支持@apply来构建自己的CSS样式: // 语义化创建一个Button样式 .btn { @apply bg-indigo-500 hover:bg-indigo-600 focus:ring
rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring