untitled
untitled
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Beautiful Flowers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
html {
scroll-behavior: smooth;
}
body {
font-family: Arial, sans-serif;
background-color: #fef9f4;
margin: 0;
padding: 0;
}
header {
background-color: #f2e8dc;
text-align: center;
padding: 40px 20px;
}
h1 {
color: #a0522d;
margin: 0;
}
nav {
background-color: #d3bfa6;
display: flex;
justify-content: center;
padding: 10px;
gap: 20px;
flex-wrap: wrap;
}
nav a {
color: #5c3a21;
text-decoration: none;
font-weight: bold;
}
nav a:hover {
text-decoration: underline;
}
.flower {
margin: 30px auto;
max-width: 800px;
padding: 20px;
background-color: #fff0f5;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.flower img {
width: 100%;
height: auto;
border-radius: 10px;
}
.flower h2 {
color: #b03060;
}
footer {
text-align: center;
padding: 20px;
background-color: #f2e8dc;
margin-top: 40px;
}
#topBtn {
position: fixed;
bottom: 30px;
right: 30px;
display: none;
background-color: #b03060;
color: white;
border: none;
padding: 10px 15px;
border-radius: 50%;
cursor: pointer;
font-size: 18px;
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
@media (max-width: 600px) {
nav {
flex-direction: column;
gap: 10px;
}
.flower {
margin: 20px;
padding: 15px;
}
}
</style>
</head>
<body>
<header id="top">
<h1>Beautiful Flowers</h1>
<p>Discover the beauty and meaning of different flowers</p>
</header>
<nav>
<a href="#rose">Rose</a>
<a href="#sunflower">Sunflower</a>
<a href="#lily">Lily</a>
</nav>
<footer>
<p>Created by [Your Name] | 2025</p>
</footer>
<script>
const topBtn = document.getElementById("topBtn");
window.onscroll = function() {
topBtn.style.display = (document.body.scrollTop > 200 ||
document.documentElement.scrollTop > 200) ? "block" : "none";
};
function scrollToTop() {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
</script>
</body>
</html>