html - 如何删除html中标签之间的空格?
问题描述
所以我有这个代码:
<form action="{{ url_for('profile') }}" method="post" enctype=multipart/form-data>
<label for="files" class="btn btn-light btn-sm">Cambiar foto de perfil</label>
<input id="files" style="visibility:hidden;" name="photo" type="file" required>
<input type="file" accept="image/*">
<label for="submit" class="btn btn-light btn-sm">Actualizar</label>
<button style="visibility:hidden;" id="submit" type="submit"> Actualizar </button>
</form>
我想知道如何消除这些标签之间的空间。我已经尝试使用 Margin="0" 并没有发生任何事情......在此先感谢。
解决方案
你指的是“Cambiar foto de perfil”右边的空间吗?如果是这样,那是由于相邻输入的样式设置为可见性:隐藏。如果您希望隐藏该输入并且不占用任何空间,则需要将其设置为 Display: none 而不是 visibility 属性。
推荐阅读
- latex - Latex:表格:堆叠多行命令中的旋转文本问题
- c# - 绑定到 ViewModel 中的对象属性,或者如何使用具有相同属性名称的多个模型
- typescript - Vuex:处理列表和详细数据的最佳方式
- laravel - Vue 中的干预图像损坏
- python - 不使用 Key 属性的 DynamoDB 更新操作
- javascript - 如何使用 javascript 获取滚动条宽度(在最新的 chrome 中)
- r - 在while循环中使用next if正数
- python-3.x - Django 管理站点“int”在模型表单提交上没有 len() 错误
- sql - 仅跟踪工作日的连续缺勤天数 SQL
- regex - 在正则表达式中强制匹配文件名*= 超过文件名=