【发布时间】:2018-11-20 02:30:40
【问题描述】:
这是我的 css 和 html 代码:
我的目标是创建一个我在图像中指定的框
.stone-item{
width: 330px;
transition: all .2s ease-in-out;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
position: relative;
margin: 0;
}
.stone-item img{
width: 330px;
height: 220px;
}
.stone-item .stone-content{
transition: all .2s ease-in-out;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
position: absolute;
bottom: -50%;
left: 0;
background: aqua;
}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="css.css">
</head>
<body>
<div class="stone-item">
<a href="#"><img src="" alt=""></a>
<div class="stone-content">
<h4> </h4>
</div>
</div>
</body>
</html>
问题出在哪里? 为什么不行??????
我想要的输出:
【问题讨论】:
-
到目前为止你有什么?
-
请回来查看。发布更新