Hi!
- User
Hi!
- Assistant
Hello! How can I assist you today?
- User
Write me code of a cyclone animation in HTML, CSS, JS.
- Assistant
Sure! Here's an example of a cyclone animation using HTML, CSS, and JavaScript:
HTML:
<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="cyclone"> </div> <script src="script.js"></script> </body> </html>CSS (style.css):
.cyclone { width: 200px; height: 200px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: linear-gradient(to bottom, #cccccc, #999999); border-radius: 50%; animation: cyclone 5s linear infinite; } @keyframes cyclone { 0% { transform: rotate(0deg) translate(-50%, -50%); } 100% { transform: rotate(360deg) translate(-50%, -50%); } }JavaScript (script.js):
// No JavaScript code needed for this animationSave the HTML, CSS, and JS code into separate files (e.g., index.html, style.css, script.js) in the same directory. Open the index.html file in a web browser, and you should see the cyclone animation.
- User
It doesn't work.
- Assistant
Apologies for the inconvenience. There seems to be a mistake in the provided code. Here's an updated version that should work properly:
HTML:
<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="cyclone"></div> <script src="script.js"></script> </body> </html>CSS (style.css):
.cyclone { width: 200px; height: 200px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: linear-gradient(to bottom, #cccccc, #999999); border-radius: 50%; animation: cyclone 5s linear infinite; } @keyframes cyclone { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }JavaScript (script.js):
// No JavaScript code needed for this animationPlease make sure to save the HTML, CSS, and JS code into separate files (e.g., index.html, style.css, script.js) in the same directory. Open the index.html file in a web browser, and you should now see the cyclone animation properly.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.