Rotate all html element (whole page) 90 degree with CSS?(用CSS将所有html元素(整个页面)旋转90度?)
问题描述
我想显示页面中的所有内容都一致且独立地旋转 90 度,我尝试这样做,但结果不准确,每个元素都独立旋转.
I want to display every thing in the page rotated consistently and dependently 90 degree, I tried to do it but the result was inaccurate and each element rotated independently.
推荐答案
这很有趣.小提琴
body{
margin:0;
overflow:hidden;
}
.wrapper{
transform: rotate(90deg);
transform-origin:bottom left;
position:absolute;
top: -100vw;
left: 0;
height:100vw;
width:100vh;
background-color:#000;
color:#fff;
overflow:auto;
}
<body>
<div class='wrapper'>
test<br />
<hr />
<div><hr /></div>
<div><div><hr /></div></div>
<div>ing</div>
</div>
</body>
必须将内容包装在包装器 div 中,将 body overflow 设置为隐藏,然后将内容向上滑动宽度......但是,嘿,它可以工作.
Had to wrap the content in a wrapper div, set body overflow to hidden, and slide the thing up by its width.... but hey, it works.
如果你很好奇,是的,我确实将高度设置为屏幕宽度,宽度设置为屏幕高度.使其干净利落地扩展自己.
If you're curious, yes, I did set height to screen-width and width to screen-height. Makes it scale itself cleanly.
这篇关于用CSS将所有html元素(整个页面)旋转90度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:用CSS将所有html元素(整个页面)旋转90度?


基础教程推荐
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01