<section data-background="http://viz.healthmetricsandevaluation.org/fgh"></section>
我也尝试将iframe放在带有类拉伸的div中,但它只占屏幕的一定百分比:
<div class = "stretch"> <iframe wIDth="100%" height="100%" src="http://viz.healthmetricsandevaluation.org/fgh"></iframe></div>解决方法 要回答有关与背景iframe交互的问题,请执行以下 *** 作:
使用reveal.Js上的dev分支来获取data-background-iframe功能.实现这个小补丁以与iframe交互,直到合并类似的东西.
function showSlIDe( slIDe ) { // ... if( background ) { // ... document.querySelector('.reveal > .backgrounds').style['z-index'] = 0; // ... if( background.hasAttribute( 'data-loaded' ) === false ) { // ... if( backgroundImage ) { // ... } // ... else if ( backgroundiframe ) { // ... document.querySelector('.reveal > .backgrounds').style['z-index'] = 1; } } }}
需要说明的是,添加的两行是:
document.querySelector('.reveal > .backgrounds').style['z-index'] = 0; // reset when not in iframedocument.querySelector('.reveal > .backgrounds').style['z-index'] = 1; // set when in iframe
参考:https://github.com/hakimel/reveal.js/pull/1029#issuecomment-65373274
总结以上是内存溢出为你收集整理的html – Reveal.js iframe背景全部内容,希望文章能够帮你解决html – Reveal.js iframe背景所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)