[英]How do I create a fixed button which opens a contact form when clicked using HTML & CSS?
Please check the example 请检查示例
Example 1(a) , Fixed button 示例1(a)固定按钮
Example 1(b) , After Click form 示例1(b),单击后表单
I have created the fixed button but I'm not able to open the form on click. 我创建了固定按钮,但单击后无法打开表单。 It will be very helpful if you can provide me with any resource or reference where I can learn how to make this. 如果您可以向我提供任何资源或参考资料,使我可以学习如何做,那么这将非常有帮助。
Thanks in Advance. 提前致谢。
This is pretty simple slideToggle function which show/hide element. 这是显示/隐藏元素的非常简单的slideToggle函数。
$(function() { $('.sp').click(function() { $('.form-wrapper').slideToggle("slow"); }); });
.sp{ position: absolute; bottom: 0px; right: 0px; cursor: pointer; width: 120px; background-color: gray; } .form-wrapper{ display:none; height: 50px; background-color: green; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="sp">Slide Me Up <div class="form-wrapper">form goes here</div> </div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.