css div旋转之后自适应


css:
.rotate90deg {
    transform: rotate(90deg);
    -ms-transform: rotate(90deg); /* IE 9 */
    -moz-transform: rotate(90deg); /* Firefox */
    -webkit-transform: rotate(90deg); /* Safari 和 Chrome */
    -o-transform: rotate(90deg); /* Opera */
}
js:

  $("#div").css({
            "width": document.body.clientHeight,
            "height": document.body.clientWidth,
            "position": "absolute",
            "top": ((document.body.clientHeight - document.body.clientWidth) / 2),
            "left": -((document.body.clientHeight - document.body.clientWidth) / 2)
        });

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM