首页 > 代码库 > CSS实现文字旋转/实现角标

CSS实现文字旋转/实现角标

主要用到属性transform:rotate(-30deg)

 

example:

.divedittable .project-tag div {
    width: 43px;
    line-height: 43px;
    text-align: center;
    color: #fff;
    font-size: 12px;
    transform: rotate(-45deg);
}
.divedittable .design-tag {
    background-image: url(‘../images/icons.png‘);
    background-position: -65px 62px;
    width: 53px;
    height: 53px;
    display: inline-block;
}
.divedittable .design-tag div {
    width: 43px;
    line-height: 43px;
    text-align: center;
    color: #fff;
    font-size: 12px;
    transform: rotate(-45deg);
}

效果图:文字放在图片上,实现角标功能

技术分享

 

参考:

http://blog.csdn.net/fengqingtao2008/article/details/52150561

CSS实现文字旋转/实现角标