微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

html – 用div隐藏的折叠输入类型

GitHub布局使用这样的结构来保护表单的CSRF(例如,可以在主页上的注册表单中看到):

display:inline">

折叠< input type =“hidden”...>的原因是什么?内联样式< div&gt ;?
不是那个< div>多余?

最佳答案
如下所述:LINK

Rails’ form tag helper helpfully puts a hidden field in with an authenticity token. Unfortunately,it wraps the hidden field in a div! So even if your form has style=”display:inline”,the div won’t.. and you won’t be able to display a form that doesn’t force a newline.

换句话说,防止换行的最安全方法添加那些样式margin:0; padding:0; display:内联到包装器div.

原文地址:https://www.jb51.cc/css/427533.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。