html相册的源代码_女朋友+水晶酷炫相册

d001e0ec69fa4e23c5a20d42521bf868.png

d567ef41fd45c7e2dfbba4e1b00c80cb.png
纯黑色为背景,周围繁星点点

5f2d5a627a82faeac7656736184e3bf0.png
纯白色应该是禁欲系的标配吧

6c4a8ff55dc14a597879cb2e1cd66c35.png
悬浮放大效果

8e498f6dc77b62b6b656e918e7bca4a3.png

d906a56771ae2a6632e7664750830873.png
加上背景图片也是别样的美感

38b611f33fd7c793fecd352e636b6ce1.png
看看不错吧

0af041bc8529526e1ab138883ccc54f8.png
做成桌面壁纸也挺好看
646b40894bbdfb627f57daf4b440f71a.png
整个效果图https://www.zhihu.com/video/1219591931765850112 知乎视频​www.zhihu.com

以HTML网页和CSS样式组合成好看效果的水晶相册。

放十二张大小不一的(xxx)图片,以(0.1--7s)的时间旋转180度。

鼠标悬浮上去就会触发放大效果,不会有视觉疲劳,反而会越来越有满足感。。

背景可选自己喜欢的,颜色或者图片。

还可添加背景音乐。

博客园地址:

HTML+CSS把女朋友照片变成酷炫相册 - 漫漫步子 - 博客园​www.cnblogs.com
aaf041e054c858359f24a29b698dd0ac.png
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,以下是一个简单的水晶酷炫相册示例: HTML代码: ```html <!DOCTYPE html> <html> <head> <title>水晶酷炫相册</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <h1>水晶酷炫相册</h1> <div class="container"> <div class="item item1"></div> <div class="item item2"></div> <div class="item item3"></div> <div class="item item4"></div> <div class="item item5"></div> <div class="item item6"></div> <div class="item item7"></div> <div class="item item8"></div> <div class="item item9"></div> </div> </body> </html> ``` CSS代码: ```css * { margin: 0; padding: 0; box-sizing: border-box; } h1 { text-align: center; margin-top: 20px; } .container { display: flex; flex-wrap: wrap; margin: 30px auto; width: 800px; max-width: 100%; } .item { width: calc(33.33% - 20px); height: 200px; margin: 10px; position: relative; overflow: hidden; transform: perspective(1000px) rotateY(0deg) rotateX(0deg) rotateZ(0deg) scale(1); transform-origin: center center; transition: all 0.3s ease-in-out; } .item:hover { transform: perspective(1000px) rotateY(45deg) rotateX(-45deg) rotateZ(0deg) scale(1.2); } .item:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.5); transform: translateZ(-1px); } .item:after { content: ''; position: absolute; top: calc(50% - 30px); left: calc(50% - 30px); width: 60px; height: 60px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.5); transform: translateZ(30px); animation: rotate 10s linear infinite; } .item1 { background-image: url('img/1.jpg'); } .item2 { background-image: url('img/2.jpg'); } .item3 { background-image: url('img/3.jpg'); } .item4 { background-image: url('img/4.jpg'); } .item5 { background-image: url('img/5.jpg'); } .item6 { background-image: url('img/6.jpg'); } .item7 { background-image: url('img/7.jpg'); } .item8 { background-image: url('img/8.jpg'); } .item9 { background-image: url('img/9.jpg'); } @keyframes rotate { from { transform: translateZ(30px) rotate(0deg); } to { transform: translateZ(30px) rotate(360deg); } } ``` 在示例中,我们使用了`flex`布局来排列相册中的每个照片,并使用了`transform`属性和过渡效果来实现照片的旋转和放大效果。我们还添加了一个半透明的白遮罩和一个旋转的圆形,使相册看起来更加酷炫。 您可以将示例代码复制到本地文件中,并将图像文件保存在名为“img”的文件夹中,然后在浏览器中打开HTML文件以查看相册
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值