我對Bootstrap移動設計有問題。即使我鍵入col-sm-12,它在移動設計中也不會精確地調整大小。我該如何解決這個問題?我正在使用bootstrap 5.3。
<link rel="stylesheet" integrity="sha512-iGjGmwIm1UHNaSuwiNFfB3+HpzT/YLJMiYPKzlQEVpT6FWi5rfpbyrBuTPseScOCWBkRtsrRIbrTzJpQ02IaLA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-12 mx-auto">
<div class="card mt-5">
<div class="card-header">
<div class="card-text">
<span>Giri?</span>
</div>
</div>
<div class="card-body">
<form method="POST" action="">
<div class="mb-3">
<label class="form-label" for="kullaniciAdi">Kullan?c? Ad?:</label>
<div class="input-group">
<span class="input-group-text"><i class="fa-solid fa-user"></i></span>
<input class="form-control" type="text" name="kullaniciAdi" placeholder="Lütfen kullan?c? ad?n?z? giriniz." required>
</div>
</div>
<div class="mb-3">
<label class="form-label" for="sifre">?ifre:</label>
<div class="input-group">
<span class="input-group-text"><i class="fa-solid fa-lock"></i></span>
<input class="form-control" type="password" name="sifre" placeholder="Lütfen ?ifrenizi giriniz." required>
</div>
</div>
<button class="btn btn-outline-success" type="submit">Giri? Yap</button>
<a class="btn btn-outline-primary" role="button" type="button" href="Kayit">Kay?t Ol</a>
</form>
</div>
</div>
</div>
</div>
</div>
我懷疑這是因為sm斷點比你的視窗寬度大。嘗試使用col-12,這是默認的(xs)設置。
xs(無):& lt576像素
sm:& gt;= 576像素
MD:& gt;= 768像素
LG:& gt;= 992像素
XL:& gt;= 1200像素
xxl:& gt;= 1400像素