我试图创建一个自定义域名(已经获得)的MS摇摆网站的形式sway.com/<id here>。
域服务提供者使用带有iframe的虚拟页面来显示实际页面的内容,并在地址栏中显示鬼域名。sway.com服务器以前似乎允许这样做,但现在正在将X帧选项设置为SAMEORIGIN,因此iframe不显示任何内容。
是否有人成功地为doing站点显示自定义域名?
发布于 2018-05-07 19:49:14
您必须使用:https://sway.com/s/{swayId}/embed而不是:https://sway.com/{swayId}]。
例如,您可以通过以下方式将sway嵌入到网站的索引页中:
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Your title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<frameset rows="100%">
<frame src="https://sway.com/s/{swayId}/embed" frameborder="0" marginwidth="0" scrolling="no" noresize="noresize"/>
</frameset>
</html>当然,您可以用iframe替换框架:
<iframe src="https://sway.com/s/{swayId}/embed" frameborder="0" marginheight="0" marginwidth="0" max-width="100%" sandbox="allow-forms allow-modals allow-orientation-lock allow-popups allow-same-origin allow-scripts" scrolling="no" style="border: none; max-width: 100%; max-height: 100vh" allowfullscreen mozallowfullscreen msallowfullscreen webkitallowfullscreen></iframe>https://webmasters.stackexchange.com/questions/101845
复制相似问题