|
|
@@ -110,27 +110,28 @@ export default function App() {
|
|
|
} else {
|
|
|
if (tempMax - height > 100) return
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// 竖屏
|
|
|
isHHTemp = false
|
|
|
const temp = width
|
|
|
- const wjwjScene = document.getElementById('wjwjScene') as HTMLIFrameElement
|
|
|
- const panoramic = document.getElementById('panoramic') as HTMLIFrameElement
|
|
|
- const A7Poem = document.getElementById('A7Poem') as HTMLIFrameElement
|
|
|
-
|
|
|
- wjwjScene.style.width = height + 'px'
|
|
|
- wjwjScene.style.height = temp + 'px'
|
|
|
- wjwjScene.style.transform = 'rotate(90deg) translate(-50%, -50%)'
|
|
|
- wjwjScene.style.transformOrigin = 'left top'
|
|
|
-
|
|
|
- panoramic.style.width = height + 'px'
|
|
|
- panoramic.style.height = temp + 'px'
|
|
|
- panoramic.style.transform = 'rotate(90deg) translate(-50%, -50%)'
|
|
|
- panoramic.style.transformOrigin = 'left top'
|
|
|
-
|
|
|
- A7Poem.style.width = height + 'px'
|
|
|
- A7Poem.style.height = temp + 'px'
|
|
|
- A7Poem.style.transform = 'rotate(90deg) translate(-50%, -50%)'
|
|
|
- A7Poem.style.transformOrigin = 'left top'
|
|
|
+
|
|
|
+ // 用来大场景调整样式
|
|
|
+ const styleStr = `
|
|
|
+ #pageIframe #wjwjScene,
|
|
|
+ #pageIframe #panoramic,
|
|
|
+ #pageIframe #A7Poem {
|
|
|
+ width: ${height}px;
|
|
|
+ height: ${temp}px;
|
|
|
+ transform: rotate(90deg) translate(-50%, -50%);
|
|
|
+ transform-origin: left top;
|
|
|
+ }
|
|
|
+ `
|
|
|
+ const styletDom = document.createElement('style')
|
|
|
+ styletDom.type = 'text/css'
|
|
|
+ styletDom.id = 'myStyle'
|
|
|
+ styletDom.innerHTML = styleStr
|
|
|
+ document.querySelector('html')?.appendChild(styletDom)
|
|
|
|
|
|
width = height
|
|
|
height = temp
|