In this tutorial, you will create a squeeze page. It is an extremely popular means of building so-called single-page tasks.
You will see a couple of awesome strategies:
Producing a typical page Intro
Utilizing masks and shadows
Making a Contact Part
Making Use Of Google Maps
Utilizing the Font Amazing toolkit
Much like the past guide, at first, we are going to produce the fundamental framework of our task.
Start the index.html file in any project folder (the folder where you have unzipped package that is MDB and paste the next rule below label.
Now we are going to produce a navigation club. Head to Navbar Docs and copy the code for fundamental Navbar. Then paste it between starting s tags.
Don’t forget to put .container as part of your navbar so that you can focus the links.
We must make one change that is significant the Navbar rule.
Include the class .fixed-top into the Navbar.
As you would expect, which makes our navbar stay glued to the top of the display screen. It’s going to be visible all of the time, even if you scroll down your page.
Now you must for one thing dazzling. Let us produce a page that is full intro for the website landing page.
Paste this rule underneath the navbar and ahead of the closing label:
I want to explain the way the rule above works.
.view is a wrapper for the back ground image, which allows us to put in a mask to it. Compliment of this mask we are useful link able to make our image darker or lighter, which assists us which will make your articles more noticeable.
.mask could be the element with absolute place, rendering it protect our history image. And since it covers the image, we are able to put it to use being a mask and manipulate the colors.
We have additionally set for the .view element. We are going to require that in a moment.
Once you save the file and recharge your web browser, you will observe that absolutely nothing changed. That is it work because we need some CSS code to make.
Firstly, we will make use of CSS that is separate file our custom designs. Open the file style.css (into the “css” folder) and paste in code below:
We set height: 100% to any or all the parent aspects of our back ground image because just by doing so we could protect the whole display screen with the image
We set #intro to an effective path that is URL the image. You can make use of whatever image you desire.
Then, we supply the value address to the property that is background-size. That produces the image cover every one of the available area on the display.
The CSS prefixes -webkit- , -moz- and -o- make sure our rule works precisely with the browsers.
Save the file andlet the happen that is magic. You will see a beautiful image covering your intro when you open your browser. There are some things which we’re able to enhance, but we are going to look after that into the next course.
To be able to replace the history image you merely need to alter the URL course. You are able to provide a web link into the image in your host or course towards the source file inside your task’s files, as an example: url(“/img/imageName.png”);
One last tip that is small
You need to use whatever image you prefer, but you can find a rules that are few you ought to follow.
Your image should be big sufficient to help keep the standard but since little as possible so not to increase the web web web page loading time. This is exactly why we recommend you ready your image the following:
1. Resolution: 1920px / 1280px
2. JPEG extendable
3. The file is compressed (you may use the COMPRES JPG device)