Участник:Нечаева Нелли Ивановна

Материал из СГУ WIKI

<!DOCTYPE html> <html lang="ru"> <head>

   <meta charset="UTF-8" />
   <title>О себе</title>
   <style>
       body {
           font-family: Arial, sans-serif;
           margin: 20px;
           line-height: 1.6;
       }
       h1 {
           text-align: center;
       }
       .profile-photo {
           display: block;
           margin: 20px auto;
           max-width: 200px;
           height: auto;
           border-radius: 10px;
       }
       .links {
           margin-top: 30px;
       }
       .links a {
           display: block;
           margin: 10px 0;
           color: #2a7ae2;
           text-decoration: none;
       }
       .links a:hover {
           text-decoration: underline;
       }
   </style>

</head> <body>

Об авторе

Здравствуйте! Меня зовут Нелли Ивановна. На этом сайте вы можете найти мои презентации, фотоальбомы, карты и другие проекты.

   <img src="images/your-photo.jpg" alt="Моя фотография" class="profile-photo" />
   

</body> </html> <!DOCTYPE html> <html lang="ru"> <head>

   <meta charset="UTF-8" />
   <title>Загрузка фотографии</title>

</head> <body>

Загрузите свою фотографию

   <input type="file" accept="image/*" id="photoInput" />
   

<img id="preview" src="#" alt="Ваше изображение" style="display:none; max-width: 100%; height: auto;" /> <script> const input = document.getElementById('photoInput'); const preview = document.getElementById('preview');
       input.addEventListener('change', function() {
           const file = this.files[0];
           if (file) {
               const reader = new FileReader();
               reader.onload = function(e) {
                   preview.src = e.target.result;
                   preview.style.display = 'block';
               }
               reader.readAsDataURL(file);
           }
       });
   </script>

</body> </html>