In today’s digital age, where attention spans are limited, we are creating an animated website using HTML CSS and javascript, animated website can be a powerful tool to captivate visitors and create a memorable online experience.
Combining the fundamental technologies of HTML, CSS, and JavaScript allows you to design a visually stunning and interactive website that stands out from the competition.
Before designing your animated website, have a clear vision of what you want to achieve. Define the purpose of your website and its target audience. Determine the message you want to convey and the emotions you wish to evoke through animations.
Map out the layout of your website on paper or using design tools. Sketch wireframes to visualize the arrangement of elements and their interactions. Consider the flow of information, user navigation, and the position of animated components.
Select a color scheme that aligns with your website’s theme and brand identity. Consider the psychological impact of colors and how they can enhance your animations.
Animated Website using HTML CSS and JavaScript
Create or gather the graphics and assets you’ll use in your animated website. Use vector graphics, icons, images, and other visual elements that complement the overall design and align with your brand.
Start building your website by creating the HTML structure. Use semantic elements like headers, navbars, main content sections, and footers to organize your content logically. This will improve accessibility and SEO.
Apply CSS styles to bring your website to life visually. Define fonts, colors, backgrounds, margins, and paddings to ensure a consistent and aesthetically pleasing design. Utilize CSS media queries for responsive design across different devices.
Familiarize yourself with CSS animations and transitions. Learn how to use keyframes to create smooth animations for elements like buttons, links, and images. Experiment with different timing functions and durations.
Introduce JavaScript to add interactivity to your website. Learn the basics of DOM manipulation to handle user interactions, such as clicks, hovers, and form submissions.
Explore animation libraries like GreenSock (GSAP) or Animate. css to create more complex and impressive animations with ease. Learn how to integrate these libraries into your website for smoother performance.
Take your animations to the next level by incorporating scroll animations. Use JavaScript libraries or code snippets to trigger animations as users scroll through your website. This adds depth and interest to your design.
Implement interactive elements, such as buttons, sliders, and menus, using JavaScript event listeners. Make sure they respond to user input and enhance the overall user experience.
Optimize your website for performance by reducing file sizes, compressing images, and minifying CSS and JavaScript files. Employ lazy loading techniques to load assets only when needed, improving loading times.
Before launching your animated website, thoroughly test it on different browsers and devices to ensure cross-browser compatibility and responsiveness. Identify and fix any bugs or issues to deliver a seamless user experience.
An animated website requires regular updates to keep it fresh and engaging. Continuously monitor user feedback and website analytics to improve performance and user satisfaction.
How to Make Animated Website Using HTML and CSS
I hope you’ve learned a lot of new things from my video tutorial, after that you can check out the animated website using HTML CSS and JavaScript source code.
You May Also Like:
- How to Create a Coming Soon Website in HTML CSS and JavaScript
- How to Make a Portfolio Website Using HTML and CSS
- How to Make a Website Using HTML and CSS
- Simple Website Using HTML and CSS with Source Code
- How to Upload HTML Website on Cpanel
The source codes are very helpful and important to understand each element, property, etc. that I’ve used inside the project, you will get ideas from it. let’s look at the source codes below.
Around the World
Traveling it leaves you speechless, than turns you into a
storytellter
t
h
e
r
o
a
d
Once you use above mentioned codes that represent the header section structure, then we need to use CSS to design it.
.header {
width: 100%;
height: calc(100vh - 7rem);
background: linear-gradient(rgba(18, 113, 255, 0.5), rgba(18, 113, 255, 0.3)),
url("../images/header-bg.jpg") center no-repeat;
background-size: cover;
position: relative;
perspective: 100rem;
}
.header-text {
text-align: center;
letter-spacing: 0.1rem;
text-shadow: 0.3rem 0.5rem var(--gray-color);
}
.heading {
font-size: 8rem;
color: var(--white-color);
text-transform: uppercase;
}
.header-paragraph {
font-size: 3rem;
color: var(--white-color);
max-width: 70rem;
margin: auto;
}
.logo {
position: absolute;
top: 4rem;
right: 4rem;
font-family: "Poppins";
font-weight: 600;
}
.logo h1 {
display: flex;
}
.logo h1 span {
font-size: 2rem;
font-weight: 700;
color: var(---primary-color);
text-transform: uppercase;
background: var(--white-color);
width: 3.5rem;
height: 3.5rem;
margin: 0.5rem;
border-radius: 50%;
}
.logo h1 span:nth-child(1) {
animation: drop-letters 5s 0.1s infinite;
}
.logo h1 span:nth-child(2) {
animation: drop-letters 5s 0.2s infinite;
}
.logo h1 span:nth-child(3) {
animation: drop-letters 5s 0.3s infinite;
}
.logo h1 span:nth-child(4) {
animation: drop-letters 5s 0.4s infinite;
}
.logo h1 span:nth-child(5) {
animation: drop-letters 5s 0.5s infinite;
}
.logo h1 span:nth-child(6) {
animation: drop-letters 5s 0.6s infinite;
}
.logo h1 span:nth-child(7) {
animation: drop-letters 5s 0.7s infinite;
}
@keyframes drop-letters {
0% {
transform: translateY(0);
}
10% {
transform: translateY(0);
}
15% {
transform: translateY(-100%);
}
20% {
transform: translateY(0);
}
100% {
transform: translateY(0);
}
}
.header-img {
width: 35%;
/* transform: translateZ(40rem); */
animation: image-float 150s infinite;
}
@keyframes image-float {
0% {
transform: translateZ(40rem);
opacity: 1;
}
40% {
transform: translateZ(-500rem) translateX(150rem);
opacity: 0.8;
}
70% {
transform: translateZ(-1500rem) translateX(800rem);
opacity: 0.8;
}
80% {
transform: translateZ(-50rem) translateX(100rem);
opacity: 0.8;
}
100% {
transform: translateZ(40rem);
opacity: 1;
}
}
That’s great you’ve successfully made the header section, let’s build a Popular tour section let’s look at that the HTML and CSS files.
The Most Popular Tours
![]()
The Wild Forest
- 7 Days tour
- up to 20 people
- 4 tour guide
- sleep guide
- difficult: medium
price > >
< < Back
$399
Booking
![]()
Along the river
- 9 Days tour
- up to 30 people
- 7 tour guide
- sleep guide private tens
- difficult: hard
price > >
< < Back
$399
Booking
![]()
The Wilid Forest
- 5 Days tour
- up to 40 people
- 8 tour guide
- sleep in hotel
- difficult: hard
price > >
< < Back
$399
Booking
Once you done the structure of HTML, then you need to use CSS to design that, let’s see the CSS
/*------------popular start----------------*/
.pupular-tours {
padding: 5rem 0 10rem 0;
}
.popular-tours-headings {
font-size: 8rem;
text-align: center;
margin-bottom: 8rem;
color: var(---primary-color);
text-shadow: 0 0.1rem 0.2rem var(---primary-color);
}
.cards-wrapper {
display: flex;
justify-content: space-evenly;
}
.card {
width: 35rem;
position: relative;
perspective: 150rem;
}
.card-image {
width: 100%;
border-radius: 0.3rem 0.3rem 0 0;
}
.front-side {
text-align: center;
background: var(--white-color);
border-radius: 0.3rem;
position: relative;
z-index: 10;
opacity: 0.9;
transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
}
.change > .front-side {
transform: translateZ(-5rem) translateX(3rem);
box-shadow: 0 2rem 4rem #777;
opacity: 0.5;
z-index: 0;
}
.tour-name {
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
position: absolute;
top: 30%;
right: 1.5rem;
color: var(--white-color);
text-shadow: 0 0 1rem #000;
}
.card-list {
width: 80%;
margin: auto;
padding: 2rem 0 0 3rem 0;
}
.card-list-item {
font-size: 1.6rem;
font-weight: 500;
color: var(--light-grey-color);
margin: 2rem 0;
border-bottom: 0.1rem solid var(---primary-color);
padding-bottom: 1.5rem;
}
.back-side {
position: absolute;
top: 0;
background: var(---primary-color);
width: 100%;
height: 100%;
border-radius: 0.3rem;
box-shadow: 0 2rem 4rem #777;
flex-direction: column;
transform: translateZ(-5rem) translateX(3rem);
opacity: 0.5s;
}
.change > .back-side {
transform: translateZ(0) translateX(0);
opacity: 0.9;
box-shadow: 0 0.5rem 4rem;
}
.tour-price {
font-size: 5rem;
font-weight: 300;
color: var(--white-color);
margin-bottom: 3rem;
}
.card-button {
color: var(---primary-color);
background: var(--white-color);
border: none;
font-size: 2.5rem;
padding: 1rem 2rem;
letter-spacing: 0.2rem;
border-radius: 5rem;
cursor: pointer;
}
.navigation-button {
position: absolute;
top: 0.5rem;
left: 0.5rem;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.8);
color: var(--light-grey-color);
border-radius: 0.3rem;
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2rem;
cursor: pointer;
}
/*------------popular close----------------*/
Inside that has features such as displaying the beck end card when you click on the button on the top left corner, so, you need to below JS code to display and hide the card.
Array.from(document.querySelectorAll(".navigation-button")).forEach((item) => {
item.onclick = () => {
item.parentElement.parentElement.classList.toggle("change");
};
});
Let’s look at the stories section, that have a video background and curved images, and we need to use HTML and CSS.
<video
src\="./images/video.mp4"
type\="video/mp4"
autoplay
muted
loop
class\="bg-video"
![]()
THese we the best days of this year
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
![]()
I enjoyed this greate tour
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
Once you used the above-mentioned codes, then you will be able to use CSS to design it. Let’s see the CSS codes
/*------------story start----------------*/
.stories {
padding: 10rem 0;
position: relative;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.bg-video {
object-fit: cover;
width: 100%;
height: 100%;
}
.stories-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.story-bg {
background-color: rgba(238, 238, 238, 0.85);
padding: 5rem;
margin: 5rem;
width: 70%;
box-shadow: 0 2rem 5rem rgba(51, 51, 51, 0.4);
transform: skewX(20deg);
border-right: 0.7rem solid var(---primary-color);
}
.story {
transform: skewX(-20deg);
display: flex;
}
.story-image {
width: 20rem;
height: 20rem;
border-radius: 50%;
object-fit: cover;
margin-right: 5rem;
}
.story-text {
letter-spacing: 0.1rem;
}
.story-heading {
font-size: 2.5rem;
text-transform: uppercase;
color: var(--gray-color);
margin-bottom: 1rem;
}
.story-paragraph {
font-size: 1.8rem;
line-height: 1.8;
color: var(--light-grey-color);
}
/*------------story close----------------*/
That’s for the story codes, so we’ve successfully made three sections, Let’s build a second last section such as Contact Us.
Contact us
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.
The Wild Forest
- 7 Days tour
- up to 20 people
- 4 tour guide
- sleep guide
- difficult: medium
price > >
< < Back
$399
Booking
![]()
Along the river
- 9 Days tour
- up to 30 people
- 7 tour guide
- sleep guide private tens
- difficult: hard
price > >
< < Back
$399
Booking
![]()
The Wilid Forest
- 5 Days tour
- up to 40 people
- 8 tour guide
- sleep in hotel
- difficult: hard
price > >
< < Back
$399
Booking
Once you done the structure of HTML, then you need to use CSS to design that, let’s see the CSS
/*------------popular start----------------*/
.pupular-tours {
padding: 5rem 0 10rem 0;
}
.popular-tours-headings {
font-size: 8rem;
text-align: center;
margin-bottom: 8rem;
color: var(---primary-color);
text-shadow: 0 0.1rem 0.2rem var(---primary-color);
}
.cards-wrapper {
display: flex;
justify-content: space-evenly;
}
.card {
width: 35rem;
position: relative;
perspective: 150rem;
}
.card-image {
width: 100%;
border-radius: 0.3rem 0.3rem 0 0;
}
.front-side {
text-align: center;
background: var(--white-color);
border-radius: 0.3rem;
position: relative;
z-index: 10;
opacity: 0.9;
transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
}
.change > .front-side {
transform: translateZ(-5rem) translateX(3rem);
box-shadow: 0 2rem 4rem #777;
opacity: 0.5;
z-index: 0;
}
.tour-name {
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
position: absolute;
top: 30%;
right: 1.5rem;
color: var(--white-color);
text-shadow: 0 0 1rem #000;
}
.card-list {
width: 80%;
margin: auto;
padding: 2rem 0 0 3rem 0;
}
.card-list-item {
font-size: 1.6rem;
font-weight: 500;
color: var(--light-grey-color);
margin: 2rem 0;
border-bottom: 0.1rem solid var(---primary-color);
padding-bottom: 1.5rem;
}
.back-side {
position: absolute;
top: 0;
background: var(---primary-color);
width: 100%;
height: 100%;
border-radius: 0.3rem;
box-shadow: 0 2rem 4rem #777;
flex-direction: column;
transform: translateZ(-5rem) translateX(3rem);
opacity: 0.5s;
}
.change > .back-side {
transform: translateZ(0) translateX(0);
opacity: 0.9;
box-shadow: 0 0.5rem 4rem;
}
.tour-price {
font-size: 5rem;
font-weight: 300;
color: var(--white-color);
margin-bottom: 3rem;
}
.card-button {
color: var(---primary-color);
background: var(--white-color);
border: none;
font-size: 2.5rem;
padding: 1rem 2rem;
letter-spacing: 0.2rem;
border-radius: 5rem;
cursor: pointer;
}
.navigation-button {
position: absolute;
top: 0.5rem;
left: 0.5rem;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.8);
color: var(--light-grey-color);
border-radius: 0.3rem;
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2rem;
cursor: pointer;
}
/*------------popular close----------------*/
Inside that has features such as displaying the beck end card when you click on the button on the top left corner, so, you need to below JS code to display and hide the card.
Array.from(document.querySelectorAll(".navigation-button")).forEach((item) => {
item.onclick = () => {
item.parentElement.parentElement.classList.toggle("change");
};
});
Let’s look at the stories section, that have a video background and curved images, and we need to use HTML and CSS.
<video
src\="./images/video.mp4"
type\="video/mp4"
autoplay
muted
loop
class\="bg-video"
![]()
THese we the best days of this year
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
![]()
I enjoyed this greate tour
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
Once you used the above-mentioned codes, then you will be able to use CSS to design it. Let’s see the CSS codes
/*------------story start----------------*/
.stories {
padding: 10rem 0;
position: relative;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.bg-video {
object-fit: cover;
width: 100%;
height: 100%;
}
.stories-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.story-bg {
background-color: rgba(238, 238, 238, 0.85);
padding: 5rem;
margin: 5rem;
width: 70%;
box-shadow: 0 2rem 5rem rgba(51, 51, 51, 0.4);
transform: skewX(20deg);
border-right: 0.7rem solid var(---primary-color);
}
.story {
transform: skewX(-20deg);
display: flex;
}
.story-image {
width: 20rem;
height: 20rem;
border-radius: 50%;
object-fit: cover;
margin-right: 5rem;
}
.story-text {
letter-spacing: 0.1rem;
}
.story-heading {
font-size: 2.5rem;
text-transform: uppercase;
color: var(--gray-color);
margin-bottom: 1rem;
}
.story-paragraph {
font-size: 1.8rem;
line-height: 1.8;
color: var(--light-grey-color);
}
/*------------story close----------------*/
That’s for the story codes, so we’ve successfully made three sections, Let’s build a second last section such as Contact Us.
Contact us
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.
price > >
< < Back
$399
Booking
![]()
Along the river
- 9 Days tour
- up to 30 people
- 7 tour guide
- sleep guide private tens
- difficult: hard
price > >
< < Back
$399
Booking
![]()
The Wilid Forest
- 5 Days tour
- up to 40 people
- 8 tour guide
- sleep in hotel
- difficult: hard
price > >
< < Back
$399
Booking
Once you done the structure of HTML, then you need to use CSS to design that, let’s see the CSS
/*------------popular start----------------*/
.pupular-tours {
padding: 5rem 0 10rem 0;
}
.popular-tours-headings {
font-size: 8rem;
text-align: center;
margin-bottom: 8rem;
color: var(---primary-color);
text-shadow: 0 0.1rem 0.2rem var(---primary-color);
}
.cards-wrapper {
display: flex;
justify-content: space-evenly;
}
.card {
width: 35rem;
position: relative;
perspective: 150rem;
}
.card-image {
width: 100%;
border-radius: 0.3rem 0.3rem 0 0;
}
.front-side {
text-align: center;
background: var(--white-color);
border-radius: 0.3rem;
position: relative;
z-index: 10;
opacity: 0.9;
transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
}
.change > .front-side {
transform: translateZ(-5rem) translateX(3rem);
box-shadow: 0 2rem 4rem #777;
opacity: 0.5;
z-index: 0;
}
.tour-name {
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
position: absolute;
top: 30%;
right: 1.5rem;
color: var(--white-color);
text-shadow: 0 0 1rem #000;
}
.card-list {
width: 80%;
margin: auto;
padding: 2rem 0 0 3rem 0;
}
.card-list-item {
font-size: 1.6rem;
font-weight: 500;
color: var(--light-grey-color);
margin: 2rem 0;
border-bottom: 0.1rem solid var(---primary-color);
padding-bottom: 1.5rem;
}
.back-side {
position: absolute;
top: 0;
background: var(---primary-color);
width: 100%;
height: 100%;
border-radius: 0.3rem;
box-shadow: 0 2rem 4rem #777;
flex-direction: column;
transform: translateZ(-5rem) translateX(3rem);
opacity: 0.5s;
}
.change > .back-side {
transform: translateZ(0) translateX(0);
opacity: 0.9;
box-shadow: 0 0.5rem 4rem;
}
.tour-price {
font-size: 5rem;
font-weight: 300;
color: var(--white-color);
margin-bottom: 3rem;
}
.card-button {
color: var(---primary-color);
background: var(--white-color);
border: none;
font-size: 2.5rem;
padding: 1rem 2rem;
letter-spacing: 0.2rem;
border-radius: 5rem;
cursor: pointer;
}
.navigation-button {
position: absolute;
top: 0.5rem;
left: 0.5rem;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.8);
color: var(--light-grey-color);
border-radius: 0.3rem;
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2rem;
cursor: pointer;
}
/*------------popular close----------------*/
Inside that has features such as displaying the beck end card when you click on the button on the top left corner, so, you need to below JS code to display and hide the card.
Array.from(document.querySelectorAll(".navigation-button")).forEach((item) => {
item.onclick = () => {
item.parentElement.parentElement.classList.toggle("change");
};
});
Let’s look at the stories section, that have a video background and curved images, and we need to use HTML and CSS.
<video
src\="./images/video.mp4"
type\="video/mp4"
autoplay
muted
loop
class\="bg-video"
![]()
THese we the best days of this year
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
![]()
I enjoyed this greate tour
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
Once you used the above-mentioned codes, then you will be able to use CSS to design it. Let’s see the CSS codes
/*------------story start----------------*/
.stories {
padding: 10rem 0;
position: relative;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.bg-video {
object-fit: cover;
width: 100%;
height: 100%;
}
.stories-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.story-bg {
background-color: rgba(238, 238, 238, 0.85);
padding: 5rem;
margin: 5rem;
width: 70%;
box-shadow: 0 2rem 5rem rgba(51, 51, 51, 0.4);
transform: skewX(20deg);
border-right: 0.7rem solid var(---primary-color);
}
.story {
transform: skewX(-20deg);
display: flex;
}
.story-image {
width: 20rem;
height: 20rem;
border-radius: 50%;
object-fit: cover;
margin-right: 5rem;
}
.story-text {
letter-spacing: 0.1rem;
}
.story-heading {
font-size: 2.5rem;
text-transform: uppercase;
color: var(--gray-color);
margin-bottom: 1rem;
}
.story-paragraph {
font-size: 1.8rem;
line-height: 1.8;
color: var(--light-grey-color);
}
/*------------story close----------------*/
That’s for the story codes, so we’ve successfully made three sections, Let’s build a second last section such as Contact Us.
Contact us
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.
Along the river
- 9 Days tour
- up to 30 people
- 7 tour guide
- sleep guide private tens
- difficult: hard
price > >
< < Back
$399
Booking
![]()
The Wilid Forest
- 5 Days tour
- up to 40 people
- 8 tour guide
- sleep in hotel
- difficult: hard
price > >
< < Back
$399
Booking
Once you done the structure of HTML, then you need to use CSS to design that, let’s see the CSS
/*------------popular start----------------*/
.pupular-tours {
padding: 5rem 0 10rem 0;
}
.popular-tours-headings {
font-size: 8rem;
text-align: center;
margin-bottom: 8rem;
color: var(---primary-color);
text-shadow: 0 0.1rem 0.2rem var(---primary-color);
}
.cards-wrapper {
display: flex;
justify-content: space-evenly;
}
.card {
width: 35rem;
position: relative;
perspective: 150rem;
}
.card-image {
width: 100%;
border-radius: 0.3rem 0.3rem 0 0;
}
.front-side {
text-align: center;
background: var(--white-color);
border-radius: 0.3rem;
position: relative;
z-index: 10;
opacity: 0.9;
transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
}
.change > .front-side {
transform: translateZ(-5rem) translateX(3rem);
box-shadow: 0 2rem 4rem #777;
opacity: 0.5;
z-index: 0;
}
.tour-name {
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
position: absolute;
top: 30%;
right: 1.5rem;
color: var(--white-color);
text-shadow: 0 0 1rem #000;
}
.card-list {
width: 80%;
margin: auto;
padding: 2rem 0 0 3rem 0;
}
.card-list-item {
font-size: 1.6rem;
font-weight: 500;
color: var(--light-grey-color);
margin: 2rem 0;
border-bottom: 0.1rem solid var(---primary-color);
padding-bottom: 1.5rem;
}
.back-side {
position: absolute;
top: 0;
background: var(---primary-color);
width: 100%;
height: 100%;
border-radius: 0.3rem;
box-shadow: 0 2rem 4rem #777;
flex-direction: column;
transform: translateZ(-5rem) translateX(3rem);
opacity: 0.5s;
}
.change > .back-side {
transform: translateZ(0) translateX(0);
opacity: 0.9;
box-shadow: 0 0.5rem 4rem;
}
.tour-price {
font-size: 5rem;
font-weight: 300;
color: var(--white-color);
margin-bottom: 3rem;
}
.card-button {
color: var(---primary-color);
background: var(--white-color);
border: none;
font-size: 2.5rem;
padding: 1rem 2rem;
letter-spacing: 0.2rem;
border-radius: 5rem;
cursor: pointer;
}
.navigation-button {
position: absolute;
top: 0.5rem;
left: 0.5rem;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.8);
color: var(--light-grey-color);
border-radius: 0.3rem;
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2rem;
cursor: pointer;
}
/*------------popular close----------------*/
Inside that has features such as displaying the beck end card when you click on the button on the top left corner, so, you need to below JS code to display and hide the card.
Array.from(document.querySelectorAll(".navigation-button")).forEach((item) => {
item.onclick = () => {
item.parentElement.parentElement.classList.toggle("change");
};
});
Let’s look at the stories section, that have a video background and curved images, and we need to use HTML and CSS.
<video
src\="./images/video.mp4"
type\="video/mp4"
autoplay
muted
loop
class\="bg-video"
![]()
THese we the best days of this year
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
![]()
I enjoyed this greate tour
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
Once you used the above-mentioned codes, then you will be able to use CSS to design it. Let’s see the CSS codes
/*------------story start----------------*/
.stories {
padding: 10rem 0;
position: relative;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.bg-video {
object-fit: cover;
width: 100%;
height: 100%;
}
.stories-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.story-bg {
background-color: rgba(238, 238, 238, 0.85);
padding: 5rem;
margin: 5rem;
width: 70%;
box-shadow: 0 2rem 5rem rgba(51, 51, 51, 0.4);
transform: skewX(20deg);
border-right: 0.7rem solid var(---primary-color);
}
.story {
transform: skewX(-20deg);
display: flex;
}
.story-image {
width: 20rem;
height: 20rem;
border-radius: 50%;
object-fit: cover;
margin-right: 5rem;
}
.story-text {
letter-spacing: 0.1rem;
}
.story-heading {
font-size: 2.5rem;
text-transform: uppercase;
color: var(--gray-color);
margin-bottom: 1rem;
}
.story-paragraph {
font-size: 1.8rem;
line-height: 1.8;
color: var(--light-grey-color);
}
/*------------story close----------------*/
That’s for the story codes, so we’ve successfully made three sections, Let’s build a second last section such as Contact Us.
Contact us
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.
price > >
< < Back
$399
Booking
![]()
The Wilid Forest
- 5 Days tour
- up to 40 people
- 8 tour guide
- sleep in hotel
- difficult: hard
price > >
< < Back
$399
Booking
Once you done the structure of HTML, then you need to use CSS to design that, let’s see the CSS
/*------------popular start----------------*/
.pupular-tours {
padding: 5rem 0 10rem 0;
}
.popular-tours-headings {
font-size: 8rem;
text-align: center;
margin-bottom: 8rem;
color: var(---primary-color);
text-shadow: 0 0.1rem 0.2rem var(---primary-color);
}
.cards-wrapper {
display: flex;
justify-content: space-evenly;
}
.card {
width: 35rem;
position: relative;
perspective: 150rem;
}
.card-image {
width: 100%;
border-radius: 0.3rem 0.3rem 0 0;
}
.front-side {
text-align: center;
background: var(--white-color);
border-radius: 0.3rem;
position: relative;
z-index: 10;
opacity: 0.9;
transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
}
.change > .front-side {
transform: translateZ(-5rem) translateX(3rem);
box-shadow: 0 2rem 4rem #777;
opacity: 0.5;
z-index: 0;
}
.tour-name {
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
position: absolute;
top: 30%;
right: 1.5rem;
color: var(--white-color);
text-shadow: 0 0 1rem #000;
}
.card-list {
width: 80%;
margin: auto;
padding: 2rem 0 0 3rem 0;
}
.card-list-item {
font-size: 1.6rem;
font-weight: 500;
color: var(--light-grey-color);
margin: 2rem 0;
border-bottom: 0.1rem solid var(---primary-color);
padding-bottom: 1.5rem;
}
.back-side {
position: absolute;
top: 0;
background: var(---primary-color);
width: 100%;
height: 100%;
border-radius: 0.3rem;
box-shadow: 0 2rem 4rem #777;
flex-direction: column;
transform: translateZ(-5rem) translateX(3rem);
opacity: 0.5s;
}
.change > .back-side {
transform: translateZ(0) translateX(0);
opacity: 0.9;
box-shadow: 0 0.5rem 4rem;
}
.tour-price {
font-size: 5rem;
font-weight: 300;
color: var(--white-color);
margin-bottom: 3rem;
}
.card-button {
color: var(---primary-color);
background: var(--white-color);
border: none;
font-size: 2.5rem;
padding: 1rem 2rem;
letter-spacing: 0.2rem;
border-radius: 5rem;
cursor: pointer;
}
.navigation-button {
position: absolute;
top: 0.5rem;
left: 0.5rem;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.8);
color: var(--light-grey-color);
border-radius: 0.3rem;
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2rem;
cursor: pointer;
}
/*------------popular close----------------*/
Inside that has features such as displaying the beck end card when you click on the button on the top left corner, so, you need to below JS code to display and hide the card.
Array.from(document.querySelectorAll(".navigation-button")).forEach((item) => {
item.onclick = () => {
item.parentElement.parentElement.classList.toggle("change");
};
});
Let’s look at the stories section, that have a video background and curved images, and we need to use HTML and CSS.
<video
src\="./images/video.mp4"
type\="video/mp4"
autoplay
muted
loop
class\="bg-video"
![]()
THese we the best days of this year
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
![]()
I enjoyed this greate tour
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
Once you used the above-mentioned codes, then you will be able to use CSS to design it. Let’s see the CSS codes
/*------------story start----------------*/
.stories {
padding: 10rem 0;
position: relative;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.bg-video {
object-fit: cover;
width: 100%;
height: 100%;
}
.stories-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.story-bg {
background-color: rgba(238, 238, 238, 0.85);
padding: 5rem;
margin: 5rem;
width: 70%;
box-shadow: 0 2rem 5rem rgba(51, 51, 51, 0.4);
transform: skewX(20deg);
border-right: 0.7rem solid var(---primary-color);
}
.story {
transform: skewX(-20deg);
display: flex;
}
.story-image {
width: 20rem;
height: 20rem;
border-radius: 50%;
object-fit: cover;
margin-right: 5rem;
}
.story-text {
letter-spacing: 0.1rem;
}
.story-heading {
font-size: 2.5rem;
text-transform: uppercase;
color: var(--gray-color);
margin-bottom: 1rem;
}
.story-paragraph {
font-size: 1.8rem;
line-height: 1.8;
color: var(--light-grey-color);
}
/*------------story close----------------*/
That’s for the story codes, so we’ve successfully made three sections, Let’s build a second last section such as Contact Us.
Contact us
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.
The Wilid Forest
- 5 Days tour
- up to 40 people
- 8 tour guide
- sleep in hotel
- difficult: hard
price > >
< < Back
$399
Booking
Once you done the structure of HTML, then you need to use CSS to design that, let’s see the CSS
/*------------popular start----------------*/
.pupular-tours {
padding: 5rem 0 10rem 0;
}
.popular-tours-headings {
font-size: 8rem;
text-align: center;
margin-bottom: 8rem;
color: var(---primary-color);
text-shadow: 0 0.1rem 0.2rem var(---primary-color);
}
.cards-wrapper {
display: flex;
justify-content: space-evenly;
}
.card {
width: 35rem;
position: relative;
perspective: 150rem;
}
.card-image {
width: 100%;
border-radius: 0.3rem 0.3rem 0 0;
}
.front-side {
text-align: center;
background: var(--white-color);
border-radius: 0.3rem;
position: relative;
z-index: 10;
opacity: 0.9;
transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
}
.change > .front-side {
transform: translateZ(-5rem) translateX(3rem);
box-shadow: 0 2rem 4rem #777;
opacity: 0.5;
z-index: 0;
}
.tour-name {
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
position: absolute;
top: 30%;
right: 1.5rem;
color: var(--white-color);
text-shadow: 0 0 1rem #000;
}
.card-list {
width: 80%;
margin: auto;
padding: 2rem 0 0 3rem 0;
}
.card-list-item {
font-size: 1.6rem;
font-weight: 500;
color: var(--light-grey-color);
margin: 2rem 0;
border-bottom: 0.1rem solid var(---primary-color);
padding-bottom: 1.5rem;
}
.back-side {
position: absolute;
top: 0;
background: var(---primary-color);
width: 100%;
height: 100%;
border-radius: 0.3rem;
box-shadow: 0 2rem 4rem #777;
flex-direction: column;
transform: translateZ(-5rem) translateX(3rem);
opacity: 0.5s;
}
.change > .back-side {
transform: translateZ(0) translateX(0);
opacity: 0.9;
box-shadow: 0 0.5rem 4rem;
}
.tour-price {
font-size: 5rem;
font-weight: 300;
color: var(--white-color);
margin-bottom: 3rem;
}
.card-button {
color: var(---primary-color);
background: var(--white-color);
border: none;
font-size: 2.5rem;
padding: 1rem 2rem;
letter-spacing: 0.2rem;
border-radius: 5rem;
cursor: pointer;
}
.navigation-button {
position: absolute;
top: 0.5rem;
left: 0.5rem;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.8);
color: var(--light-grey-color);
border-radius: 0.3rem;
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2rem;
cursor: pointer;
}
/*------------popular close----------------*/
Inside that has features such as displaying the beck end card when you click on the button on the top left corner, so, you need to below JS code to display and hide the card.
Array.from(document.querySelectorAll(".navigation-button")).forEach((item) => {
item.onclick = () => {
item.parentElement.parentElement.classList.toggle("change");
};
});
Let’s look at the stories section, that have a video background and curved images, and we need to use HTML and CSS.
<video
src\="./images/video.mp4"
type\="video/mp4"
autoplay
muted
loop
class\="bg-video"
![]()
THese we the best days of this year
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
![]()
I enjoyed this greate tour
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
Once you used the above-mentioned codes, then you will be able to use CSS to design it. Let’s see the CSS codes
/*------------story start----------------*/
.stories {
padding: 10rem 0;
position: relative;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.bg-video {
object-fit: cover;
width: 100%;
height: 100%;
}
.stories-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.story-bg {
background-color: rgba(238, 238, 238, 0.85);
padding: 5rem;
margin: 5rem;
width: 70%;
box-shadow: 0 2rem 5rem rgba(51, 51, 51, 0.4);
transform: skewX(20deg);
border-right: 0.7rem solid var(---primary-color);
}
.story {
transform: skewX(-20deg);
display: flex;
}
.story-image {
width: 20rem;
height: 20rem;
border-radius: 50%;
object-fit: cover;
margin-right: 5rem;
}
.story-text {
letter-spacing: 0.1rem;
}
.story-heading {
font-size: 2.5rem;
text-transform: uppercase;
color: var(--gray-color);
margin-bottom: 1rem;
}
.story-paragraph {
font-size: 1.8rem;
line-height: 1.8;
color: var(--light-grey-color);
}
/*------------story close----------------*/
That’s for the story codes, so we’ve successfully made three sections, Let’s build a second last section such as Contact Us.
Contact us
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.
price > >
< < Back
$399
Booking
Once you done the structure of HTML, then you need to use CSS to design that, let’s see the CSS
/*------------popular start----------------*/
.pupular-tours {
padding: 5rem 0 10rem 0;
}
.popular-tours-headings {
font-size: 8rem;
text-align: center;
margin-bottom: 8rem;
color: var(---primary-color);
text-shadow: 0 0.1rem 0.2rem var(---primary-color);
}
.cards-wrapper {
display: flex;
justify-content: space-evenly;
}
.card {
width: 35rem;
position: relative;
perspective: 150rem;
}
.card-image {
width: 100%;
border-radius: 0.3rem 0.3rem 0 0;
}
.front-side {
text-align: center;
background: var(--white-color);
border-radius: 0.3rem;
position: relative;
z-index: 10;
opacity: 0.9;
transition: opacity 0.4s, transform 0.4s, box-shadow 0.4s;
}
.change > .front-side {
transform: translateZ(-5rem) translateX(3rem);
box-shadow: 0 2rem 4rem #777;
opacity: 0.5;
z-index: 0;
}
.tour-name {
font-size: 2.5rem;
font-weight: 600;
text-transform: uppercase;
position: absolute;
top: 30%;
right: 1.5rem;
color: var(--white-color);
text-shadow: 0 0 1rem #000;
}
.card-list {
width: 80%;
margin: auto;
padding: 2rem 0 0 3rem 0;
}
.card-list-item {
font-size: 1.6rem;
font-weight: 500;
color: var(--light-grey-color);
margin: 2rem 0;
border-bottom: 0.1rem solid var(---primary-color);
padding-bottom: 1.5rem;
}
.back-side {
position: absolute;
top: 0;
background: var(---primary-color);
width: 100%;
height: 100%;
border-radius: 0.3rem;
box-shadow: 0 2rem 4rem #777;
flex-direction: column;
transform: translateZ(-5rem) translateX(3rem);
opacity: 0.5s;
}
.change > .back-side {
transform: translateZ(0) translateX(0);
opacity: 0.9;
box-shadow: 0 0.5rem 4rem;
}
.tour-price {
font-size: 5rem;
font-weight: 300;
color: var(--white-color);
margin-bottom: 3rem;
}
.card-button {
color: var(---primary-color);
background: var(--white-color);
border: none;
font-size: 2.5rem;
padding: 1rem 2rem;
letter-spacing: 0.2rem;
border-radius: 5rem;
cursor: pointer;
}
.navigation-button {
position: absolute;
top: 0.5rem;
left: 0.5rem;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.8);
color: var(--light-grey-color);
border-radius: 0.3rem;
border: none;
font-size: 1.5rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2rem;
cursor: pointer;
}
/*------------popular close----------------*/
Inside that has features such as displaying the beck end card when you click on the button on the top left corner, so, you need to below JS code to display and hide the card.
Array.from(document.querySelectorAll(".navigation-button")).forEach((item) => {
item.onclick = () => {
item.parentElement.parentElement.classList.toggle("change");
};
});
Let’s look at the stories section, that have a video background and curved images, and we need to use HTML and CSS.
<video
src\="./images/video.mp4"
type\="video/mp4"
autoplay
muted
loop
class\="bg-video"
THese we the best days of this year
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
I enjoyed this greate tour
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perferendis aliquid architecto deserunt ea, voluptatibus
commodi. Atque, facilis consectetur? Minima, sequi dolores
ipsam qui facere quos id eligendi reiciendis perferendis
labore sapiente saepe, quasi minus nostrum provident hic nam
dignissimos earum.
Once you used the above-mentioned codes, then you will be able to use CSS to design it. Let’s see the CSS codes
/*------------story start----------------*/
.stories {
padding: 10rem 0;
position: relative;
}
.video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.8;
}
.bg-video {
object-fit: cover;
width: 100%;
height: 100%;
}
.stories-wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
.story-bg {
background-color: rgba(238, 238, 238, 0.85);
padding: 5rem;
margin: 5rem;
width: 70%;
box-shadow: 0 2rem 5rem rgba(51, 51, 51, 0.4);
transform: skewX(20deg);
border-right: 0.7rem solid var(---primary-color);
}
.story {
transform: skewX(-20deg);
display: flex;
}
.story-image {
width: 20rem;
height: 20rem;
border-radius: 50%;
object-fit: cover;
margin-right: 5rem;
}
.story-text {
letter-spacing: 0.1rem;
}
.story-heading {
font-size: 2.5rem;
text-transform: uppercase;
color: var(--gray-color);
margin-bottom: 1rem;
}
.story-paragraph {
font-size: 1.8rem;
line-height: 1.8;
color: var(--light-grey-color);
}
/*------------story close----------------*/
That’s for the story codes, so we’ve successfully made three sections, Let’s build a second last section such as Contact Us.
Contact us
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.
Full Name*
Email*
Phone*
Message*
<textarea
name\="#"
id\=""
cols\="30"
rows\="10"
class\="form-textarea"
Submit
After making the structure of the HTML page, then you need to CSS to design it.
/*------------contact start----------------*/
.contact {
padding: 15rem 0 20rem 0;
text-align: center;
background: url("../images/contact-us-bg.png") center no-repeat;
background-size: cover;
animation: contact-bg 35s infinite;
}
.contact-heading {
font-size: 7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5rem;
color: var(--white-color);
text-shadow: 0 1rem 2rem #000;
margin-bottom: 8rem;
}
.contact-form {
width: 70rem;
height: 50rem;
background: rgba(255, 255, 255, 0.95);
margin: auto;
flex-direction: column;
border-radius: 0.5rem;
box-shadow: 0 1rem 3rem #000;
padding: 5rem;
}
.input-group {
width: 100%;
display: flex;
flex-direction: column;
margin: 1rem 0;
position: relative;
}
.input-groups {
width: 100%;
display: flex;
justify-content: space-between;
}
.input-groups .input-group {
width: 48.5%;
}
.input-group input,
.input-group textarea {
padding: 3rem 1rem 1rem 1rem;
background: var(--secondary-color);
border: 0.1rem solid var(--secondary-color);
font-size: 1.4rem;
color: var(--light-grey-color);
letter-spacing: 0.1rem;
border-spacing: 0.1rem;
border-radius: 0.5rem;
resize: none;
}
.input-group input:focus,
.input-group text:focus {
border: 0.11rem solid #ccc;
}
.input-group label {
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1rem;
color: var(--gray-color);
position: absolute;
top: 1rem;
left: 1rem;
}
.form-btn {
width: 100%;
padding: 1rem;
letter-spacing: 0.1rem;
margin-top: 1rem;
background-color: var(--light-grey-color);
color: var(--white-color);
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: all 0.4s;
}
.form-btn:hover {
background: var(--gray-color);
}
@keyframes contact-bg {
0% {
background-color: #3d3d3d;
}
25% {
background-color: #ced8e4;
}
50% {
background-color: #1e81f3;
}
75% {
background-color: #ff7842;
}
75% {
background-color: #3d3d3d;
}
}
Finally, we need to design the footer section, inside that we will display the menus with cool effects.