首页  >  文章  >  web前端  >  css2D特效tranform--文字折叠效果_html/css_WEB-ITnose

css2D特效tranform--文字折叠效果_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-21 09:13:531551浏览

<!DOCTYPE html><html><head>    <meta charset="UTF-8">    <title>Document</title></head><style>body{ background: #34c4e6;   }p{    color: aliceblue;    font-family: "微软雅黑";    font-size: 8em;;    font-weight: bold;    text-align: center;    }p span{position: relative;}p span:before{   content: attr(data-text);     display: inline-block;    position: absolute;    top: 0px;    left: 0px;    color: #34c4e6;    transform-origin: left top;    transform:rotateY(-40deg);    text-shadow: 1px 1px 0 #34869a;    z-index: 2;}p span:hover::before{    color: #34c4e6;    transform:rotateY(0);}p span:after{   content: attr(data-text);     display: inline-block;    position: absolute;    top: 0px;    left: 0px;    color:rgba(0,0,0,0.2);    transform-origin: left top;    transform:skew(0deg,20deg);}p span:hover::after{    color: #684da3;    transform:rotateY(0);}   </style><body>    <p>        <span data-text="郭">郭</span>        <span data-text="垒">垒</span>        <span data-text="好">好</span>    </p></body></html>


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn