我正在使用 Google 协作平台嵌入 HTML 代码,将代码粘贴到“从网络嵌入”窗口中。输出的长度是可变的。
iframe我希望有一种方法可以动态调整Google 协作平台用于托管 HTML 的父级的高度。
我知道我可以使用 Google 协作平台用户界面手动分配更多空间,不幸的是,内容会根据 API 的数据而有所不同,因此我无法事先知道高度。目前,只要内容填满分配的空间,就会出现垂直滚动条,并且看起来不太好。
我尝试了以下操作,它仅删除滚动条而不允许我看到内容:
<script>parent.document.getElementsByTagName('iframe')[0].scrolling="no";</script>
Run Code Online (Sandbox Code Playgroud)
Google 网站示例位于https://sites.google.com/view/auto-ajust-gsite-embed/home
这是我在上面的示例站点中使用的代码:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
crossorigin="anonymous"
/>
<title>auto adjust google site embed</title>
</head>
<body>
<div class="accordion accordion-flush" id="accordionFlushExample">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingOne">
<button
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#flush-collapseOne"
aria-expanded="false"
aria-controls="flush-collapseOne"
>
Accordion Item #1
</button>
</h2>
<div …Run Code Online (Sandbox Code Playgroud) 谷歌在2016年11月修改了他们的网站平台,但据我所知,不再有为其编写Google Apps脚本的选项.Google是否已宣布何时将其纳入新网站平台?有任何想法吗?
我正在尝试在Flex环境上部署App Engine节点服务。下面是我的配置app.yaml
runtime: nodejs8
env: flex
#to name a service use below syntax
service: exampleNodeApp
env_variables:
NODE_ENV: "dev"
PORT: 3000
skip_files:
.env
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
Run Code Online (Sandbox Code Playgroud)
该配置将使用node8映像。我package.json的如下
{
"name": "expressapp",
"version": "1.0.0",
"private": true,
"main": "./bin/www",
"scripts": {
"start": "node ./bin/www",
},
"dependencies": {
"express": "~4.16.3",
}
}
Run Code Online (Sandbox Code Playgroud)
我尝试指定引擎也喜欢
{
"node": "~8.*"
}
Run Code Online (Sandbox Code Playgroud)
并查看我使用的调试日志
gcloud app deploy --version default1 --verbosity=debug
Run Code Online (Sandbox Code Playgroud)
我得到的错误如下。尝试一切后仍无法解决。我的应用程序在本地运行良好。请帮忙!
--update--错误日志
UnsatisfiedRequirementsError: Your application does not satisfy all of the …Run Code Online (Sandbox Code Playgroud) google-app-engine google-sites node.js google-cloud-platform google-sites-2016