有没有办法仅使用标准标签等在HTML页面中嵌入PowerPoint幻灯片演示文稿?我尝试使用iframe,但那只会导致PowerPoint被下载。
<iframe src="Chapter1.pptx">Your browser does not support.</iframe>
我正在寻找一种只使用标准工具来展示幻灯片的方法。我知道我可以使用Google文档或Flash等工具,但我更愿意采用简单的实现方式。
难道Web就无法处理PowerPoint演示文稿吗?
有没有办法仅使用标准标签等在HTML页面中嵌入PowerPoint幻灯片演示文稿?我尝试使用iframe,但那只会导致PowerPoint被下载。
<iframe src="Chapter1.pptx">Your browser does not support.</iframe>
我正在寻找一种只使用标准工具来展示幻灯片的方法。我知道我可以使用Google文档或Flash等工具,但我更愿意采用简单的实现方式。
难道Web就无法处理PowerPoint演示文稿吗?
简单明了……这是将任何 Microsoft 或 Adobe 文件嵌入 HTML 网站的最佳方法。
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[https://www.your_website/file_name.pptx]' width='100%' height='600px' frameborder='0'>
更新此问题的方法:现在有一种新的方法可以在网页中嵌入Powerpoint。如果您在OneDrive上有帐户,请使用Powerpoint Online (通过浏览器访问Powerpoint)执行以下操作以嵌入Powerpoint:
网页浏览器无法识别PowerPoint,但除了Flash之外还有其他解决方案。
您可以将PowerPoint导出为HTML或PDF格式。或者您也可以将其上传到类似slideshare这样的网站,并使用他们专门为此问题设计的播放器。
我决定采用一种简单的方法,将PowerPoint上传到YouTube,然后在iframe中包含YouTube视频。
<iframe height="375" width="600" src="http://www.youtube.com/embed/assignedId"></iframe>
我知道,这很便宜,但也很容易。
最终,我将页面检查为XHTML Strict格式,该格式不支持<iframe>
标签。因此,我使用了object
标签代替。
<object data="http://www.youtube.com/embed/assignedId">
<iframe src='https://view.officeapps.live.com/op/view.aspx?src=[https://www.your_website/file_name.pptx]' width='100%' height='600px' frameborder='0'>
然后在你的HTML文件中使用以下代码以全屏模式显示幻灯片。
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/journey.css">
</head>
<body>
<!-- show slides in html web page -->
<iframe src="https://docs.google.com/presentation/d/e/2PAxxxxxCX-xxxxxxxx-_GuZImZqRUxxxxxxxxxx/embed?start=true&loop=false&delayms=3000" frameborder="0" width="1440" height="839" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
</body>
</html>
我通过将PPT另存为mp4格式(另存为 > MPEG-4 视频 (*.mp4))并使用视频标签来实现这一点。
<video controls autoplay preload="none" style="width:1000px;">
<source src="/_dev/power_point/m11983.mp4" type="video/mp4" />
<p>Your browser does not support HTML5 Video.</p>
</video>