html - 在输入文本旁边放置按钮
问题描述
如何在这张照片中的输入文本旁边放置按钮?
我有这个代码:
<form action='/posts/comment/{{id}}' method='POST'>
<input class="form-control" type="text" name='comment' id='comment' placeholder="Comment as {{name}}..." aria-label="Comment as {{name}}...">
</form>
解决方案
根据问题和屏幕截图回答。
button{
margin-left:-6px;
border-left:none;
}
<form action='/posts/comment/{{id}}' method='POST'>
<input class="form-control" type="text" name='comment' id='comment' placeholder="Comment as {{name}}..." aria-label="Comment as {{name}}...">
<button>Save Comment </button>
</form>
推荐阅读
- python - Pyhon3.4 TypeError:'dict_keys'对象不支持索引
- r - 使用 purrr 中的 map() 绘制时间序列
- android - 如何设置随机渐变背景颜色?
- php - 如果我们有数组索引的概念,如何使用 array_column 函数从数组中获取记录?
- division - 如何有效地找到整数 k 的值,其中 q 有限地除 b ^ k?
- c# - 如何等到 C# 中的方法完成?
- asp.net - ASP.Net UserControls 不触发任何 AutoPost Back 或 Click 事件
- python - 在熊猫中选择包含关键字的列名称
- python - 调试 python tensorflow 问题
- java - Java netbeans如何在jar文件中启动gui运行