如何旋转div Html图层? [英] How to rotate a div Html layer?

查看:111
本文介绍了如何旋转div Html图层?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Div层像这样

  ... 
< style type =text / css >
<! -
#newImg {
position:absolute;
left:180px;
top:99px;
width:704px;
height:387px;
z-index:1;
background-image:url(../ Pictures / repbg.png);
background-repeat:repeat;

}

- >
< / style>< / head>

< body>

< div id =newImgname =newImg>< / div>
...

如何旋转?

解决方案

在这一点上本地做的唯一方法是使用 -moz-transform



详情如下。



https://developer.mozilla.org/en/CSS/-moz-transform



更新:显然,这是一种跨浏览器兼容的方式,还有一个jQuery插件,它会为你做:



http://plugins.jquery.com/project/Transform/



可能会有更多的兼容性。


I have a Div layer like this

...
<style type="text/css">
<!--
#newImg {
    position:absolute;
    left:180px;
    top:99px;
    width:704px;
    height:387px;
    z-index:1;
    background-image:url(../Pictures/repbg.png);
    background-repeat:repeat;

}

-->
</style></head>

<body>

<div id="newImg" name="newImg" ></div>
...

How to rotate it?

解决方案

The only way to do it natively at this point is to use -moz-transform.

Details are here.

https://developer.mozilla.org/en/CSS/-moz-transform

This is not cross-browser compatible, though, so use at your own risk.

Update: Apparently, there is also a jQuery plug-in that will do it for you:

http://plugins.jquery.com/project/Transform/

Probably a little more compatibility there.

这篇关于如何旋转div Html图层?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆