【问题标题】:Making break line without using <br/>在不使用 <br/> 的情况下制作断线
【发布时间】:2017-08-12 23:23:55
【问题描述】:

我想在一行中显示第一个 input[email] 和我的按钮,并在另一行中显示其余部分,还想禁用我的复选框的默认样式并以透明背景显示它。

<form method="post" name="form_BE_box" action="">
<input type="email" name="mail" placeholder="Votre adresse mail" id="MAIL"/>
<button class="button" type="submit">S'inscrire</button><br/>
<input type="checkbox" checked="checked" value="Partenaire" name="fou" /> Cochez ici pour s'inscrire aux communications partenaire
</form>

【问题讨论】:

  • @VilleKoo 我尝试在 span 元素中制作每个块,并在 { content: '\A'; 之后应用以下 css空白:pre; }" 但没有成功

标签: css background-color line-breaks


【解决方案1】:

您可以将输入包含在 div 中。这是一个有效的jsfiddle

关于复选框,你可以看看这个答案:stackoverflow

<form method="post" name="form_BE_box" action="">
<input type="email" name="mail" placeholder="Votre adresse mail" id="MAIL"/>
<button class="button" type="submit">S'inscrire</button>
<div>
<input type="checkbox" checked="checked" value="Partenaire" name="fou" /> Cochez ici pour s'inscrire aux communications partenaire
</div>
</form>

【讨论】:

  • 谢谢@vadber 它帮助了我,但我像这样修复了我的错误
猜你喜欢
  • 1970-01-01
  • 2017-10-16
  • 2011-02-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-21
相关资源
最近更新 更多