css实现元素(文本、图片、DIV)旋转90度
(2012-08-30 14:11:42)
<style
type="text/css">
a {
color:#000;
}
.example-date {
background-color:#998877;
border:1px solid navy;
width:600px;
height:400px;
margin:30px auto 0px;
padding:45px 15px 0;
position:relative;
}
.example-date .day {
font-size:45px;
left:5px;
line-height:45px;
position:absolute;
top:0;
}
.example-date .month {
font-size:25px;
text-transform:uppercase; / *
全部转为大写 * /
}
.example-date .year {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
filter:
progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
display:block;
border:1px solid olive;
font-size:1.1em;
background-color:#998877;
position:absolute;
right:0px;
top:10px;
}
</style>
<div class="example-date">
<span
class="day">31</span>
<span
class="month">July</span>
<span
class="year">2009</span>
</div>
=============================================
说明:不兼容ie6。
喜欢
0
赠金笔
加载中,请稍候......