2-9 自由编程作业提交
来源:2-9 自由编程
我在浪费钱
2021-09-03 04:49:08
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2-9 自由编程</title>
<style>
div {
overflow: hidden;
position: relative;
width: 800px;
height: 569px;
}
div img{
width: 100%;
height: 569px;
}
div p {
color: #fff;
line-height: 48px;
padding-left: 30px;
position: absolute;
width: 100%;
bottom: -65px;
height: 48px;
background-color: #000;
opacity: 0.8;
transition: all 0.5s ease 0s;
}
div:hover p{
bottom: -16px;
}
</style>
</head>
<body>
<div>
<img src="https://i.loli.net/2021/09/03/fQrnF5qKpBLTNAb.jpg" >
<!-- <a href="https://sm.ms/image/fQrnF5qKpBLTNAb" target="_blank"><img src="https://i.loli.net/2021/09/03/fQrnF5qKpBLTNAb.jpg" ></a> -->
<p>好大!(我指的是图片!这图片6400x4260像素。)</p>
</div>
</body>
</html>
1回答
同学你好,代码实现效果很棒。继续加油,祝学习愉快!
相似问题