我想在我的站点中放置一个表单我使用来自 bootstrap 官方站点的基本表单代码但是 getbootstrap.com 的 View 与我的 View 非常不同(特别是按钮和输入 View 与该站点非常不同)
HTML:
<form>
<fieldset>
<legend>dfhadfhahhf</legend>
<label>isim</label>
<input type="text" placeholder="Type something…">
</fieldset><br>
<fieldset>
<label>isim</label>
<input type="text" placeholder="Type something…">
<button type="submit" class="btn">Submit</button>
</fieldset>
<!-- Form -->
</form>
顺便说一句,我拥有 Bootstrap 的所有组件:
<link href="static/css/bootstrap.css" rel="stylesheet">
<link href="static/css/style.css" rel="stylesheet">
问题出在哪里? :(
最佳答案
你缺少一些类名等尝试类似的东西
<form role="form">
<div class="form-group">
<legend>dfhadfhahhf</legend>
<label>isim</label>
<input type="text" placeholder="Type something…" class="form-control">
</div>
<br>
<div class="form-group">
<label>isim</label>
<input type="text" placeholder="Type something…" class="form-control">
<button type="submit" class="btn btn-default">Submit</button>
</div>
<!-- Form -->
</form>
例如:
<form role="form">
并交换你的 fieldset 用于:
<div class="form-group">
等等
关于html - Twitter Bootstrap 基础 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20846135/