screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Change Image Source</title> <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script> </head> <body> <div id="container"> <img id="myImage" src="https://www.sarkarinaukriexams.com/images/bio/1701330017-bio.png" alt="Original Image"> <button id="changeButton">Change Image</button> </div> <script> $(document).ready(function() { $("#changeButton").click(function() { $("#myImage").attr("src", "https://www.sarkarinaukriexams.com/images/bio/1701330118-bio.png"); }); }); </script> <style> body { font-family: 'Arial', sans-serif; background-color: #f4f4f4; margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; } #container { text-align: center; } #myImage { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); transition: box-shadow 0.3s ease-in-out; } #changeButton { background-color: #3498db; color: #fff; padding: 10px 20px; font-size: 16px; border: none; border-radius: 4px; cursor: pointer; margin-top: 20px; transition: background-color 0.3s ease-in-out; } #changeButton:hover { background-color: #2980b9; } </style> </body> </html>