我有 3 個表格
<form th:method="get" th:action=="..." th:object="${...}" >
<input type="submit" value="Edit" class="btn btn-primary my-2">
</form>
<form th:method="delete" th:action="..." th:object="${...}">
<input type="submit" value="Delete" class="btn btn-secondary my-2">
</form>
<form th:method="put" th:action="..." th:object="${...}">
<input type="submit" value="Back" class="btn btn-primary my-2">
</form>
我怎樣才能用引導程式將它們排成一排
uj5u.com熱心網友回復:
您必須將所有這些表單元素放在一個 div 中,并將樣式添加到 div 中,如下所示。您也可以使用 wrap 進行樣式設定。
justify-content: center; /* Pack items around the center */
justify-content: start; /* Pack items from the start */
justify-content: end; /* Pack items from the end */
justify-content: flex-start; /* Pack flex items from the start */
justify-content: flex-end; /* Pack flex items from the end */
justify-content: left; /* Pack items from the left */
justify-content: right; /* Pack items from the right */
您可以閱讀檔案以獲得更好的理解。
uj5u.com熱心網友回復:
您可以簡單地將它們包裝在 a 中div并將它們排成一flex排。
.wrap {
display: flex;
}
<div class="wrap">
<form th:method="get" th:action=="..." th:object="${...}">
<input type="submit" value="Edit" class="btn btn-primary my-2">
</form>
<form th:method="delete" th:action="..." th:object="${...}">
<input type="submit" value="Delete" class="btn btn-secondary my-2">
</form>
<form th:method="put" th:action="..." th:object="${...}">
<input type="submit" value="Back" class="btn btn-primary my-2">
</form>
<div>
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/476400.html
