- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>CSS旋转图片</title>
- <style type="text/css">
- #div_img{
- margin: 100px auto 0;
- transform:rotate(30deg);
- -moz-transform:rotate(30deg);
- -webkit-transform:rotate(30deg);
- -o-transform:rotate(30deg);
- filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
- }
- </style>
- </head>
- <body style="width:99%; height:100%;">
- <div id="body_div" style="text-align:center; vertical-align:middle;">
- <img src1="cat.jpg" id="div_img" width="500" height="400"/>
- </div>
- </body>
- </html>
来源: http://www.phpxs.com/code/1005270/