We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题:我在通过js实现 对不同电脑显示器进行适配操作时,使用了如下代码:transform: scale(0.56389, 0.56389) 但是我发现,当我加上它之后,我点击书的右侧,他不能翻页了,
当我将这段样式 从开发者模式中注销掉时,就恢复正常了。所以我现在搞不清楚,是什么原因引起的这一现象?求解决方案
如下 是我的相关代码:
//页面加载时执行 $(function() { calcRate() window.addEventListener('resize', resize) }) //自适应translate(-50%, -50%) function calcRate() { const appRef = document.getElementById("canvas") if(!appRef) return const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5)) if (appRef) { if (currentRate > baseProportion) { scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5) scale.height = (window.innerHeight / baseHeight).toFixed(5) appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)` } else { scale.height = ((window.innerWidth / baseProportion) / baseHeight).toFixed(5) scale.width = (window.innerWidth / baseWidth).toFixed(5) appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)` } } } function resize () { clearTimeout(drawTiming) drawTiming = setTimeout(() => { this.calcRate() }, 200) }
The text was updated successfully, but these errors were encountered:
你可以使用 turn4 其中的size方法可以达到该效果
Sorry, something went wrong.
https://github.com/blasten/Turn.js-4th-release
@hyf-hub 移动端旋转90度后,翻页位置错乱,这个该怎么解决,请求帮助
我最近刚遇到类似问题..... 页面缩放后需要计算偏移量。在翻页这里,需要将原来的e.pageX和e.pageY除以缩放量 即turn.js中 e.pageX/zoom ,e.pageY/zoom
有没有前辈指导一下,如果这个作为商用需要弄什么不,虽然这是国外的。
No branches or pull requests
问题:我在通过js实现 对不同电脑显示器进行适配操作时,使用了如下代码:transform: scale(0.56389, 0.56389)
但是我发现,当我加上它之后,我点击书的右侧,他不能翻页了,
当我将这段样式 从开发者模式中注销掉时,就恢复正常了。所以我现在搞不清楚,是什么原因引起的这一现象?求解决方案
如下 是我的相关代码:
The text was updated successfully, but these errors were encountered: