Skip to main content

Parallax Website using HTML And CSS

VIDEO:



Source Code:

     Images used:


HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Parallax Website</title>
</head>
<body>
    <div class="bg1">
        <h1>Parallax</h1>
    </div>

    <div class="bg2">

    </div>

    <div class="bg3">

    </div>
    
</body>
</html>

CSS:
*{
    margin0;
    padding0;
    font-family: Century Gothic;
}
.bg1{
    height100vh;
    width100%;
    backgroundurl("photo1.jpg")no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
.bg1 h1{
    padding20px 50px;
    background: black;
    color#ffffff;
    font-size70px;
    font-weight400;
    font-style: italic;
    position: absolute;
    top50%;
    left50%;
    transformtranslate(-50%,-50%);
}
.bg2{
    height100vh;
    width100%;
    backgroundurl("photo2.jpg")no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
.bg3{
    height100vh;
    width100%;
    backgroundurl("photo3.jpg")no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
::-webkit-scrollbar{
    display: none;
}

Comments

Popular posts from this blog

Amazing 404 Error Page Using HTML & CSS

  Video: Source Code: <! DOCTYPE   html > < html   lang = "en" > < head >     < meta   charset = "UTF-8" >     < meta   name = "viewport"   content = "width=device-width, initial-scale=1.0" >     < meta   http-equiv = "X-UA-Compatible"   content = "ie=edge" >     < title >Error! 404</ title > </ head > <style> * {     margin:  0 ;     padding:  0 ;     font-family: Nunito;     box-sizing:  border-box ; } body {     background:  linear-gradient (to  right ,  #48dbfb ,  #1dd1a1 );     display:  flex ;     align-items:  center ;     justify-content:  center ;     min-heigh...

Pure CSS Hamburger Menu | Side Bar Menu

Video:  Source Code: HTML <! DOCTYPE   html > < html   lang = "en" > < head >      < meta   charset = "UTF-8" >      < meta   name = "viewport"   content = "width=device-width, initial-scale=1.0" >      < meta   http-equiv = "X-UA-Compatible"   content = "ie=edge" >      < link   rel = "stylesheet"   href = "style.css" >      < title > Hamburger Menu </ title > </ head > < body >      < input   type = "checkbox"   name = ""   id = "check" >      < label   class = "ham_menu"   for = "check" > &#9776; </ label >      < div   class = "main" >          < label   for = "check" > &times; </ label ...

UI Card Design Using Only HTML and CSS

\ <! DOCTYPE   html > < html   lang = "en" > < head >     < meta   charset = "UTF-8" >     < meta   name = "viewport"   content = "width=device-width, initial-scale=1.0" >     < meta   http-equiv = "X-UA-Compatible"   content = "ie=edge" >     < title >UI CARD DESIGN</ title >     < link   rel = "stylesheet"   href = "style.css" > </ head > < body >     < div   class = "box" >         < div   class = "text" >             < h2 >Gaming Mouse</ h2 >             < p >Lorem ipsum dolor sit amet consectetur adipisicing...