Участник:Нечаева Нелли Ивановна: различия между версиями
Материал из СГУ WIKI
м |
|||
| Строка 48: | Строка 48: | ||
<a href="https://ваш-сайт.com" target="_blank">Мой сайт</a> | <a href="https://ваш-сайт.com" target="_blank">Мой сайт</a> | ||
</div> | </div> | ||
</body> | |||
</html> | |||
<!DOCTYPE html> | |||
<html lang="ru"> | |||
<head> | |||
<meta charset="UTF-8" /> | |||
<title>Загрузка фотографии</title> | |||
</head> | |||
<body> | |||
<h1>Загрузите свою фотографию</h1> | |||
<input type="file" accept="image/*" id="photoInput" /> | |||
<br><br> | |||
<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> | </body> | ||
</html> | </html> | ||
Версия 13:22, 13 ноября 2025
<!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" />
Мои работы
<a href="presentation.html" target="_blank">Презентация</a>
<a href="photo-album.html" target="_blank">Фотоальбомы</a>
<a href="map.html" target="_blank">Карта</a>
<a href="https://ваш-сайт.com" target="_blank">Мой сайт</a>
</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>