为什么span里的字不显示?帮帮忙 代码很少的

来源:-

Pual丶成

2016-06-10 23:17


<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>无标题文档</title>

<style type="text/css">

.wrap{

                width:500px;

                 height:300px;

                 margin:0 auto;

                 -webkit-perspective:800px;

                 -webkit-perspective-origin:50% 50%;

                -webkit-transition: all .6s;

                 position:relative;

}

.cont{

             height:300px;

             -webkit-transform-style: preserve-3d;

}

.cont:  hover{   -webkit-transform: translateZ(-150px) rotateX(90deg);  }

.cont img{

                     display:block;

                     position:absolute;

                     -webkit-transform:translateZ(150px);

                     width:100%;

                     height:100%;

}

.cont content1{

                     display:block;

                     background:#666;

                     position:absolute;

                     font-size:50px;

                     color: #000;

                     line-height:300px;

                     -webkit-transform:rotateX(-90deg) translateZ(150px);

                     }



</style>

</head>


<body>

<div class="wrap">

         <div class="cont">

            <img src="jj.jpg" />

            <span class="content1">几ljajj</span>

         </div>

</div>

</body>

</html>


写回答 关注

1回答

  • 学术袁
    2023-08-04 10:01:10

    display:'inline-block';或者block

十天精通CSS3

本课程为CSS3入门教程,深刻详解CSS3知识让网页穿上绚丽装备

242554 学习 · 2623 问题

查看课程

相似问题