码迷,mamicode.com
首页 > Web开发 > 详细

css右上角文字倾斜

时间:2017-09-29 19:55:24      阅读:462      评论:0      收藏:0      [点我收藏+]

标签:右上角   red   lang   hidden   class   .com   lock   image   es2017   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .aaa{
            width:200px;
            height:200px;
            position:relative;
            background: #ccc;
            overflow: hidden;
        }
        .aaa .bbb{
            width:100px;
            height:100px;
            position: absolute;
            background: red;
            top:-50px;
            right:-50px;
            transform: rotate(45deg);
            color:#fff;
        }
        .aaa .bbb span{
            position: absolute;
            bottom:0;
            display: block;
            width:100px;
            text-align: center;
        }
    </style>
</head>
<body>
<div class="aaa">
    <div class="bbb">
        <span>文字倾斜</span>
    </div>
</div>
</body>
</html>

技术分享

css右上角文字倾斜

标签:右上角   red   lang   hidden   class   .com   lock   image   es2017   

原文地址:http://www.cnblogs.com/Ljshu/p/7612198.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!