[英]Make Font Awesome icon a submit for a form
I'm trying to make a font awesome icon (empty square) clickable inside a form post. 我正在尝试在表单帖子中制作一个字体很棒的图标(空方块)。 However, the code I tried showed the icon inside a button.
但是,我尝试的代码显示了按钮内的图标。 I do not need the button, not the aesthetic I am looking for (see attached screenshot).
我不需要按钮,不需要我想要的美学(参见附件截图)。 Any thoughts?
有什么想法吗? I am using this html code (showing the submit code only to keep it simple):
我正在使用这个HTML代码(只显示提交代码以保持简单):
<!--input type="image" class="fa fa-square-o fa-lg" /-->
<button type="submit" id="completed-task">
<i class="fa fa-square-o fa-lg"></i>
</button>
You can hide the button by taking away the border, background and padding; 您可以通过取消边框,背景和填充来隐藏按钮;
<button type="submit" id="completed-task" class="fabutton">
<i class="fa fa-square-o fa-lg"></i>
</button>
.fabutton {
background: none;
padding: 0px;
border: none;
}
@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); .fabutton { background: none; padding: 0px; border: none; }
<button type="submit" id="completed-task" class="fabutton"> <i class="fa fa-square-o fa-lg"></i> </button>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.