我不明白为什么我的输入框不是全宽的.
我使用tailwind css.
<div class="flex flex-col md:flex-row md:items-center md:justify-between">
<div class="flex flex-row items-center">
<div class="icon">ICON</div>
<div class="brand">BRAND</div>
</div>
<div class="flex grow">
<span class="relative flex w-full items-center bg-green-200 p-4">
<label for="search"></label>
<div class="icon absolute">ICON</div>
<input placeholder="WHY NOT FULL WIDTH FOR THIS INPUT BOX?????" class=""
/></span>
</div>
<div class="flex flex-row">SECTION-2</div>
</div>
例如,如果我将input
元素替换为div
,那么这一切都是正确的,div
是全宽的.但出于某种原因,input
元素并非如此.为什么?