首页 > 设计 > WEB开发 > 正文

【CSS3】右上角倾斜文字

2019-11-02 18:21:19
字体:
来源:转载
供稿:网友

这里写图片描述

CSS3】右上角倾斜文字


<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> .aaa{ width:200px; height:200px; position:relative; background: red; overflow: hidden; } .aaa .bbb{ width:100px; height:100px; position: absolute; background: green; top:-50px; right:-50px; transform: rotate(45deg); } .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>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表