如何让div旋转一定的角度

 时间:2026-05-07 04:36:49

用css3的transform属性就可以将div旋转。

一、m11,m12,m21.m22 是控制角度的,<html> <head> <meta http-equiv="Content-Type"  content="text/html; charset=utf-8"> <title>DIV 旋转属性的。

二、演示</title> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <style type="text/css"> body { font-family: "Arial", sans-serif; } #example { position: absolute; border: #09F solid 1px; font-weight: 900; padding: 10px; display: block;width: 500px; height: 400px; margin-top: 67px; margin-left: 112px; transform: rotate(40deg); -o-transform: rotate(40deg); -webkit-transform: rotate(40deg); -moz-transform: rotate(40deg); filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1.2660444431189777, M12=-0.3327876096865394, M21=0.1127876096865398,M22=0.9660444431189779); } </style> <!--[if IE]> <style type="text/css"> #example { top: 50px; left: 50px; } </style> <![endif]--> </head> <body> <div id="example">旋转成功</div>。

  • 路由器如何配置特权密码
  • CSS怎么设置固定定位
  • eNSP保存配置文件
  • Visual Studio怎么新建html页面
  • css如何实现带弧度的边框样式
  • 热门搜索
    什么快递最好 迂回的意思 淡然是什么意思 公元前是什么意思 什么是波推 cp是什么意思网络用语 非公有制经济的作用 试纸什么时候用 各得其所的意思 什么菜好吃又好做