CSS 有没有办法编辑新的谷歌表单的css?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37184582/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a way to edit css of new google forms?
提问by YellowSmurf
Before I used to be able to just copy the source code of the form and paste the part between <form></form>
into the page and add my own styling. But this doesn't seem to work anymore.
Has anyone found a way to still be able to customize google forms?
以前我只能复制表单的源代码并将其间的部分粘贴<form></form>
到页面中并添加我自己的样式。但这似乎不再起作用了。有没有人找到仍然能够自定义谷歌表单的方法?
回答by Sharath kumar
Yes, you can easily make the <form>
work by following these steps.
是的,您可以<form>
按照以下步骤轻松完成工作。
- Create a Google Form.
- Get the link and open the form in a new tab.
- Create a barebone form having same items as the Google form.
- Inspect Google form for
action
attribute.- a. Copy the same action to your form.
- Inspect and find values for attributes
name
in the Google form.- a. Give the same name values for your form items as well. The values look like
entry.742532386
.
- a. Give the same name values for your form items as well. The values look like
- Check if your form gets the responses.
- 创建一个谷歌表单。
- 获取链接并在新选项卡中打开表单。
- 创建一个与 Google 表单具有相同项目的准系统表单。
- 检查 Google 表单的
action
属性。- 一种。将相同的操作复制到您的表单中。
- 检查并查找
name
Google 表单中属性的值。- 一种。也为您的表单项提供相同的名称值。值看起来像
entry.742532386
.
- 一种。也为您的表单项提供相同的名称值。值看起来像
- 检查您的表单是否收到回复。
Since it is a native <form>
element, apply CSS however you want to.
由于它是原生<form>
元素,因此可以随意应用 CSS。
Read more here
在这里阅读更多
回答by Fiach Reid
Here's a script that allows you override the CSS styles of a Google form:
这是一个允许您覆盖 Google 表单的 CSS 样式的脚本:
http://googleformrestyler.apixml.net/
http://googleformrestyler.apixml.net/
What it does, is it pulls down the content of the google form using a CORS proxy, then writes the HTML content of the form directly onto the page using Document.write. After which, you have complete control to edit the CSS and Javascript of the google form.
它的作用是使用 CORS 代理拉取 google 表单的内容,然后使用 Document.write 将表单的 HTML 内容直接写入页面。之后,您就可以完全控制编辑 google 表单的 CSS 和 Javascript。