gpt4 book ai didi

html - 为什么我的按钮没有出现在页面上?

转载 作者:太空宇宙 更新时间:2023-11-04 05:24:03 24 4
gpt4 key购买 nike

我有这个表格的一部分:

<%= form_for current_user.relationships.build(:followed_id => @profile.user.id) do |f| %>
<div><%= f.hidden_field :followed_id %></div>
<div class="follow_button"><%= f.submit "Follow" %></div>
<% end %>

呈现到我的个人资料 View 。这是生成的 html:

<form accept-charset="UTF-8" action="/relationships" class="new_relationship" id="new_relationship" method="post">
<div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓">
<input name="authenticity_token" type="hidden" value="fo9dve4XjKpqSHqkmYw/lsEPm4PUxRYy+5JM5D4aTLg="></div>
<div><input id="relationship_followed_id" name="relationship[followed_id]" type="hidden" value="58"></div>
<div class="follow_button"><input id="relationship_submit" name="commit" type="submit" value="Follow"></div>
</form>

表单有了,按钮的css display属性没有隐藏,为什么按钮没有出现?

最佳答案

也许您的 CSS 文件中的其他内容导致提交按钮被隐藏。尝试禁用整个页面的 CSS 样式,看看按钮是否仍然隐藏。

关于html - 为什么我的按钮没有出现在页面上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5644600/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com