|
|

楼主 |
发表于 2022-7-1 20:27
|
显示全部楼层
二楼效果,需要鼠标滑过才能看到图片被CSS精灵加工的效果。以下是代码:
- <style>
- .papa {
- margin: 0 auto;
- margin-top: 60px;
- width: 660px;
- height: 338px;
- background: tan ;/*url('pic/xcrm1.jpg') no-repeat center/cover;*/
- perspective: 1000px;
- box-shadow: 4px 4px 28px rgba(0,0,0,.85);
- position: relative;
- }
- .papa>span {
- width: 50%;
- height: 50%;
- transition: all 1s linear;
- transform-style: preserve-3d;
- position: absolute;
- }
- .papa>span:hover {
- transform: rotateZ(15deg) rotateY(60deg);
- box-shadow: 2px 2px 40px rgba(0,0,0,.95);
- cursor: pointer;
- }
- .papa>span:nth-child(1) {
- left: 0;
- top: 0;
- background: url('/data/attachment/forum/202206/24/200554upvwl1h3u3gpjpwv.jpg') 0px 0px;
- }
- .papa>span:nth-child(2) {
- left: 50%;
- top: 0;
- background: url('/data/attachment/forum/202206/24/200554upvwl1h3u3gpjpwv.jpg') -330px 0px;
- }
- .papa>span:nth-child(3) {
- left: 0;
- top: 50%;
- background: url('/data/attachment/forum/202206/24/200554upvwl1h3u3gpjpwv.jpg') 0px -169px;
- }
- .papa>span:nth-child(4) {
- left: 50%;
- top: 50%;
- background: url('/data/attachment/forum/202206/24/200554upvwl1h3u3gpjpwv.jpg') -330px -169px;
- }
- </style>
- <div class="papa">
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- </div>
复制代码
|
评分
-
| 参与人数 1 | 威望 +30 |
金钱 +60 |
经验 +30 |
收起
理由
|
加林森
| + 30 |
+ 60 |
+ 30 |
很给力! |
查看全部评分
|