Design Synth

Responsive Perfume Website Template Design Using HTML, CSS & JavaScript

Responsive Perfume Website Template Design Using HTML, CSS & JavaScript

Responsive Perfume Website Template Design Using HTML, CSS & JavaScript

Responsive Perfume Website Template Design Using HTML, CSS & JavaScript

Explore the World→ Discover The Best Destination In The World It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. (1)

🧭 Overview

In this tutorial, you will learn how to make a mobile-friendly and modern Perfume Website with HTML, CSS and JavaScript. This design includes a fixed navigation bar, a cool hero section, buttons with a gradient, and smooth scroll animations with ScrollReveal.js.

By the end of this tutorial you will learn how to:

🧩 Project Files

Before we begin, create the following file structure:

perfume-website/
β”‚
β”œβ”€β”€ index.html
β”œβ”€β”€ style.css
β”œβ”€β”€ script.js
└── images/
Β  Β  Β  Β  β”œβ”€β”€ hero.png
Β  Β  Β  Β  └── bg.png

🧱 Step 1: Creating the Navbar

The navbar includes the following:

🧱 Step 2: Creating the Hero Section

The hero section includes:

Use gradient backgrounds for buttons:Β 

background-image: linear-gradient(180deg, #e1bbf7 0%, #af6de5 46%, #36104f 100%)

🧱 Step 3: Making It Responsive

To make your design look great on all devices:

@media (max-width: 768px) {
/* Adjust column stacking, font size, padding */
}

🧱 Step 4: Adding Scroll Animations

We will implement ScrollReveal.js to animate the elements when brought into view via scrolling.

1. Add ScrollReveal CDN

Paste this code before the closing tag:

<script src=”https://unpkg.com/scrollreveal”></script>

2. Add the animation script:

<script>
const scrollRevealOption = {
distance: “50px”,
origin: “bottom”,
duration: 1000,
};

ScrollReveal().reveal(“.header__image img”, { …scrollRevealOption, origin: “right” });
ScrollReveal().reveal(“.header__content h1”, { …scrollRevealOption, delay: 500 });
ScrollReveal().reveal(“.header__content p”, { …scrollRevealOption, delay: 1000 });
</script>

🧱 Step5: Adding JS for the Menu

Now we will have the mobile navigation menu open/close on a click.

<script>
const menuBtn = document.getElementById(“menu-btn”);
const navLinks = document.getElementById(“nav__links”);
const menuBtnIcon = menuBtn.querySelector(“i”);

menuBtn.addEventListener(“click”, () => {
navLinks.classList.toggle(“open”);
const isOpen = navLinks.classList.contains(“open”);
menuBtnIcon.setAttribute(“class”, isOpen ? “ri-close-line” : “ri-menu-line”);
});
</script>

πŸ’‘ Note: This will toggle your navigation open and close smoothly on an icon switch.

Previous Post
Related Post

Design Synth

Welcome to Design Synth! Enter the world of web design, where art meets code. Find awesome designs, practice new techniques, and churn out stunning digital experiences that excite and engage an audience.

Popular Posts

4 (1)
Cloughoughter Castle in Lough Oughter, County Cavan, Ireland
How To Clone a $10,000 Website in Seconds With AI..
bg (1)
How To Make a WordPress Website | Using WordPress
c6b45d83c46635192a295793dc3fe49d
How To Make a WordPress Website | WordPress Tutorial
Explore the World→ Discover The Best Destination In The World It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout
Replace 50+ WordPress Plugins With Just ONE (Free Tool!)

Explore Topics

4 (1)

Tag Clouds

4 (1)
Explore the World→ Discover The Best Destination In The World It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. (1)

🧭 Overview

In this tutorial, you will learn how to make a mobile-friendly and modern Perfume Website with HTML, CSS and JavaScript. This design includes a fixed navigation bar, a cool hero section, buttons with a gradient, and smooth scroll animations with ScrollReveal.js.

By the end of this tutorial you will learn how to:

🧩 Project Files

Before we begin, create the following file structure:

perfume-website/
β”‚
β”œβ”€β”€ index.html
β”œβ”€β”€ style.css
β”œβ”€β”€ script.js
└── images/
Β  Β  Β  Β  β”œβ”€β”€ hero.png
Β  Β  Β  Β  └── bg.png

🧱 Step 1: Creating the Navbar

The navbar includes the following:

🧱 Step 2: Creating the Hero Section

The hero section includes:

Use gradient backgrounds for buttons:Β 

background-image: linear-gradient(180deg, #e1bbf7 0%, #af6de5 46%, #36104f 100%)

🧱 Step 3: Making It Responsive

To make your design look great on all devices:

@media (max-width: 768px) {
/* Adjust column stacking, font size, padding */
}

🧱 Step 4: Adding Scroll Animations

We will implement ScrollReveal.js to animate the elements when brought into view via scrolling.

1. Add ScrollReveal CDN

Paste this code before the closing tag:

<script src=”https://unpkg.com/scrollreveal”></script>

2. Add the animation script:

<script>
const scrollRevealOption = {
distance: “50px”,
origin: “bottom”,
duration: 1000,
};

ScrollReveal().reveal(“.header__image img”, { …scrollRevealOption, origin: “right” });
ScrollReveal().reveal(“.header__content h1”, { …scrollRevealOption, delay: 500 });
ScrollReveal().reveal(“.header__content p”, { …scrollRevealOption, delay: 1000 });
</script>

🧱 Step5: Adding JS for the Menu

Now we will have the mobile navigation menu open/close on a click.

<script>
const menuBtn = document.getElementById(“menu-btn”);
const navLinks = document.getElementById(“nav__links”);
const menuBtnIcon = menuBtn.querySelector(“i”);

menuBtn.addEventListener(“click”, () => {
navLinks.classList.toggle(“open”);
const isOpen = navLinks.classList.contains(“open”);
menuBtnIcon.setAttribute(“class”, isOpen ? “ri-close-line” : “ri-menu-line”);
});
</script>

πŸ’‘ Note: This will toggle your navigation open and close smoothly on an icon switch.

Previous Post
Related Post

Design Synth

Welcome to Design Synth! Enter the world of web design, where art meets code. Find awesome designs, practice new techniques, and churn out stunning digital experiences that excite and engage an audience.

Popular Posts

4 (1)
Cloughoughter Castle in Lough Oughter, County Cavan, Ireland
How To Clone a $10,000 Website in Seconds With AI..
bg (1)
How To Make a WordPress Website | Using WordPress
c6b45d83c46635192a295793dc3fe49d
How To Make a WordPress Website | WordPress Tutorial
Explore the World→ Discover The Best Destination In The World It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout
Replace 50+ WordPress Plugins With Just ONE (Free Tool!)

Explore Topics

4 (1)

Tag Clouds

4 (1)
Explore the World→ Discover The Best Destination In The World It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. (1)
🧭 Overview

In this tutorial, you will learn how to make a mobile-friendly and modern Perfume Website with HTML, CSS and JavaScript. This design includes a fixed navigation bar, a cool hero section, buttons with a gradient, and smooth scroll animations with ScrollReveal.js.

By the end of this tutorial you will learn how to:

🧩 Project Files

Before we begin, create the following file structure:

perfume-website/
β”‚
β”œβ”€β”€ index.html
β”œβ”€β”€ style.css
β”œβ”€β”€ script.js
└── images/
Β  Β  Β  Β  β”œβ”€β”€ hero.png
Β  Β  Β  Β  └── bg.png

🧱 Step 1: Creating the Navbar

The navbar includes the following:

🧱 Step 2: Creating the Hero Section

The hero section includes:

Use gradient backgrounds for buttons:Β 

background-image: linear-gradient(180deg, #e1bbf7 0%, #af6de5 46%, #36104f 100%)

🧱 Step 3: Making It Responsive

To make your design look great on all devices:

@media (max-width: 768px) {
/* Adjust column stacking, font size, padding */
}

🧱 Step 4: Adding Scroll Animations

We will implement ScrollReveal.js to animate the elements when brought into view via scrolling.

1. Add ScrollReveal CDN

Paste this code before the closing tag:

<script src=”https://unpkg.com/scrollreveal”></script>

2. Add the animation script:

<script>
const scrollRevealOption = {
distance: “50px”,
origin: “bottom”,
duration: 1000,
};

ScrollReveal().reveal(“.header__image img”, { …scrollRevealOption, origin: “right” });
ScrollReveal().reveal(“.header__content h1”, { …scrollRevealOption, delay: 500 });
ScrollReveal().reveal(“.header__content p”, { …scrollRevealOption, delay: 1000 });
</script>

🧱 Step5: Adding JS for the Menu

Now we will have the mobile navigation menu open/close on a click.

<script>
const menuBtn = document.getElementById(“menu-btn”);
const navLinks = document.getElementById(“nav__links”);
const menuBtnIcon = menuBtn.querySelector(“i”);

menuBtn.addEventListener(“click”, () => {
navLinks.classList.toggle(“open”);
const isOpen = navLinks.classList.contains(“open”);
menuBtnIcon.setAttribute(“class”, isOpen ? “ri-close-line” : “ri-menu-line”);
});
</script>

πŸ’‘ Note: This will toggle your navigation open and close smoothly on an icon switch.

Previous Post
Related Post

Design Synth

Welcome to Design Synth! Enter the world of web design, where art meets code. Find awesome designs, practice new techniques, and churn out stunning digital experiences that excite and engage an audience.

Popular Posts

4 (1)
Cloughoughter Castle in Lough Oughter, County Cavan, Ireland
How To Clone a $10,000 Website in Seconds With AI..
bg (1)
How To Make a WordPress Website | Using WordPress
c6b45d83c46635192a295793dc3fe49d
How To Make a WordPress Website | WordPress Tutorial
Explore the World→ Discover The Best Destination In The World It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout
Replace 50+ WordPress Plugins With Just ONE (Free Tool!)

Explore Topics

4 (1)

Tag Clouds

4 (1)

Leave a Comment