[英]Restoring page zoom/scale via button
Unfortunately I have no code at all to begin with. 不幸的是,我根本没有任何代码。 After a long search on Google and on Stackoverflow I can't seem to find anything related with this.
在Google和Stackoverflow上进行长时间搜索之后,我似乎找不到与此相关的任何内容。
Basically I have a button on my webpage saying, for example, "Restore scale", so that when someone clicks on it, the page's zoom/scale restores to 100%. 基本上,我的网页上有一个按钮,例如“还原比例”,这样当有人单击它时,页面的缩放比例将恢复为100%。 Though I have no clue about how to do this.
尽管我不知道如何执行此操作。
Can someone help? 有人可以帮忙吗?
jQuery和CSS解决方案:
$('body').css('MozTransform','scale(1)');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.