【发布时间】:2020-01-24 18:32:32
【问题描述】:
我想将文本输入和按钮并排放置,它们之间留有大约 10px 的边距。
通过这段代码,我得到了你在上传照片上看到的结果。
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="float-left">
<input type="number" class="form-control item_page_item_db w-50" id="quantity<?php echo intval($kat['termek_id']); ?>" value="1">
</div>
<div class="float-left">
<button class="btn btn-outline-secondary add_to_cart_button" data-product-id="<?php echo intval($kat['termek_id']); ?>" type="button"><i class="fa fa-shopping-basket" aria-hidden="true"></i> Kosárba helyezem
</button>
</div>
<div class="clearfix"></div>
</div>
我希望它们彼此靠近,并以正确的方式垂直居中。现在,他们没有任何 css 大小,只有颜色和字体大小......
【问题讨论】:
-
请注意,
<link>标签不使用也不需要结束斜杠,并且在 HTML 中从来没有。
标签: html css bootstrap-4