简体   繁体   English

我如何创建一个固定的按钮,当使用HTML和CSS单击该按钮时会打开一个联系表单?

[英]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.

相关问题 如何在html / javascript / css中创建一个按钮,当单击该按钮时,该按钮可打开网页中的示例网页 - how to create a button in html/javascript/css that when clicked opens a sample web page within a webpage 无论如何要在 html 中创建一个按钮,单击该按钮会打开 css? - Is there anyway to create a button in html which when clicked, turns on the css? 如何使用 HTML、css 和 javascript 创建此 hover 按钮 - How do I create this hover button Using HTML, css and javascript 当使用html和css单击按钮图像时,如何使用按钮图像获取按钮图像源 - how can I use button images to get the button image source when they are clicked using html and css 单击时如何创建箭头以滚动到下一个视频? HTML、CSS 和 Javascript 特定 - How do I create arrows to scroll to the next video when clicked? HTML, CSS and Javascript specific HTML/CSS/JS:如果我在侧边栏上列出了几个 mp4 视频,我如何创建一个网页,点击时视频会在页面的主要部分打开? - HTML/CSS/JS: If I list several mp4 videos on a sidebar, how could I create a webpage where the video opens in the main part of the page when clicked? 使用 React,如何仅在单击按钮时创建文本字段,并在单击按钮时继续创建更多文本字段? - Using React, how do I create a textfield only when a button is clicked and keep on creating more textfields when the button is clicked? 即使单击标签区域,bootstraps默认表单输入也会打开。 我该如何预防? - bootstraps default form input opens even when the label area is clicked. How do i prevent this? 如何在控制器中创建一个按钮以打开表单(ext js) - How to create a button in the controller which opens the form (ext js) 如何使用引导程序和HTML创建联系表单 - How to create a contact form using bootstrap and HTML
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM