在html5中如何通过AmazeUI实现点击元素显示全屏
小编给大家分享一下在html5中如何通过AmazeUI实现点击元素显示全屏,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
无论是点击图片还是按钮来显示全屏,具体代码如下:
点击按钮:
<!DOCTYPEhtml><html><head><metacharset="utf-8"><title></title><scripttype="text/javascript"src="js/jquery.min.js"></script><scripttype="text/javascript"src="js/amazeui.legacy.js"></script><scripttype="text/javascript"src="js/amazeui.js"></script><scripttype="text/javascript"src="js/amazeui.widgets.helper.js"></script><scripttype="text/javascript"src="js/app.js"></script><scripttype="text/javascript"src="js/handlebars.min.js"></script><scripttype="text/javascript"src="js/polyfill/rem.min.js"></script><scripttype="text/javascript"src="js/polyfill/respond.min.js"></script><linkrel="stylesheet"href="css/amazeui.css"/><linkrel="stylesheet"href="css/bootstrap.css"/><linkrel="stylesheet"href="css/admin.css"/><linkrel="stylesheet"href="css/amazeui.flat.css"/><linkrel="stylesheet"href="css/app.css"/><scripttype="text/javascript">$(function(){$('#demo-full-page').on('click',function(){if($.AMUI.fullscreen.enabled){$.AMUI.fullscreen.request();}else{//Ignoreordosomethingelse}})});</script></head><body><buttonid="demo-full-page"class="am-btnam-btn-primary">Fullscreenthepage</button></body></html>
类似可以用于任何元素,也能达到这种效果。
AmazeUI却是用起来挺方便快捷的。
以上是“在html5中如何通过AmazeUI实现点击元素显示全屏”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。