gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
用HTML加css写一个相册旋转代码
- User
用HTML加css写一个相册旋转代码
- Assistant
以下是一个简单的HTML代码,可以将多张图片组成一个相册,通过CSS动画实现旋转效果:
<!DOCTYPE html> <html> <head> <title>相册旋转</title> <style> .album { margin: 0 auto; width: 400px; height: 400px; position: relative; perspective: 1000px; } .album img { width: 100%; height: 100%; position: absolute; top: 0; left: 0; backface-visibility: hidden; } .album img:first-child { transform: rotateY(0deg); animation: rotate 8s infinite linear; } .album img:nth-child(2) { transform: rotateY(60deg); animation: rotate 8s infinite linear 1s; } .album img:nth-child(3) { transform: rotateY(120deg); animation: rotate 8s infinite linear 2s; } .album img:nth-child(4) { transform: rotateY(180deg); animation: rotate 8s infinite linear 3s; } .album img:nth-child(5) { transform: rotateY(240deg); animation: rotate 8s infinite linear 4s; } .album img:nth-child(6) { transform: rotateY(300deg); animation: rotate 8s infinite linear 5s; } @keyframes rotate { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } } </style> </head> <body> <div class="album"> <img src="https://picsum.photos/id/1/800/800" alt="photo1"/> <img src="https://picsum.photos/id/2/800/800" alt="photo2"/> <img src="https://picsum.photos/id/3/800/800" alt="photo3"/> <img src="https://picsum.photos/id/4/800/800" alt="photo4"/> <img src="https://picsum.photos/id/5/800/800" alt="photo5"/> <img src="https://picsum.photos/id/6/800/800" alt="photo6"/> </div> </body> </html>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.