|
|

楼主 |
发表于 2022-10-30 20:52
|
显示全部楼层
好好琢磨以下代码,是它们完成了一切图片转换的功能:
<style>
#papa {
margin: auto;
width: 1024px;
height: 640px;
background: gray url('https://638183.freep.cn/638183/t22/webp/erhu-2.webp.jpg') no-repeat center/cover;
box-shadow: 3px 3px 20px #000;
position: relative;
z-index: 1;
}
#papa::before {
position: absolute;
content: '';
width: 100%;
height: 100%;
background: snow url('https://638183.freep.cn/638183/t22/webp/erhu-1.webp') no-repeat center/cover;
opacity: 0;
transition: all 1.5s;
}
#papa:hover::before {
opacity: 1;
}
</style>
<div id="papa"></div> |
评分
-
| 参与人数 1 | 威望 +50 |
金钱 +100 |
经验 +50 |
收起
理由
|
小辣椒
| + 50 |
+ 100 |
+ 50 |
收到~~~ |
查看全部评分
|