Search code examples
javascripthtmlcssbackgroundbackground-image

Make an image blend with a color as the website background


I am trying to add a background gradient image and have a color blend with it as my background image. The way I'm currently attempting to do it is by adding the image and then having a background color under the body CSS and then 'mix-blend-mode: soft-light;' the image. It works for the first part of the screen but I want it to repeat as the background throughout the whole website. How would i do so? The background image i want to use is https://st.depositphotos.com/1244201/3732/i/950/depositphotos_37326627-stock-photo-grey-grainy-plaster-background.jpg and the color I want it to mix with is #daeef6. I have added my code below along with a screenshot of the first page which works the way I'd like. enter image description here

/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Lemon&family=Open+Sans:wght@400;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: #38afff;
  --first-color-alt: hsl(204, 94%, 52%);
  --title-color: hsl(233, 32%, 15%);
  --text-color: hsl(233, 4%, 35%);
  --body-color: #daeef6;

  --first-hue: 250;
  --sat: 66%;
  --lig: 75%;
  --second-hue: 219;

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: 'Open Sans', sans-serif;
  --second-font: 'Lemon', cursive;
  --biggest-font-size: 2.25rem;
  --normal-font-size: .938rem;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}


/* Page Loader */
#pageloader {
    background: #ede3f6 url(../img/SafeChoice.png) no-repeat center center;
    height: 100vh;
    width: 100%;
    position: fixed;
    z-index: 10000;
    background-size: 20%;
  
    
  }
  
img {
  -khtml-user-select: none;
  -o-user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none

}

/* Responsive typography */
@media screen and (min-width: 1224px) {
  :root {
    --biggest-font-size: 3.5rem;
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background: #daeef6;
  color: var(--text-color);
  overflow-x: hidden;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1024px;
  margin-right: 1.5rem;
  margin-left: 1.5rem;
}

.main {
  overflow: hidden; /* For the animations */
  z-index: 5;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
}

.pa-fixed-header {
    background-color: hsl(196, 60%, 91%) !important;
    -webkit-transition: background-color .3s ease-out;
    -moz-transition: background-color .3s ease-out;
    -o-transition: background-color .3s ease-out;
    transition: background-color .3s ease-out;
   
}


.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-family: var(--second-font);
  color: var(--first-color);
}

.nav__logo span {
  color: var(--title-color);
}

.nav__toggle {
  display: inline-flex;
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    background-color: var(--body-color);
    left: 0;
    top: -100%;
    box-shadow: 0 8px 24px hsla(2, 100%, 35%, .2);
    width: 100%;
    padding: 3.5rem 0 3rem;
    border-radius: 0 0 2rem 2rem;
    transition: top .4s;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  text-align: center;
  row-gap: 2rem;
}

.nav__link, 
.nav__close {
  color: var(--title-color);
}

.nav__link {
  font-weight: 600;
  transition: color .4s;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.nav__img {
  width: 100px;
  position: absolute;
  top: -.75rem;
  left: 1.5rem;
}

/* Show menu */
.show-menu {
  top: 0;
}

/* Active link */
.active-link {
  color: var(--first-color);
}

/*=============== HOME ===============*/
.home,
.home__container{
  position: relative;
}

.home__container {
  padding-top: 8rem;
  height: 100vh;
  display: grid;
  row-gap: 1rem;
}

.home__title {
  font-size: var(--biggest-font-size);
  font-family: var(--second-font);
  color: var(--title-color);
  margin-bottom: .75rem;
}

.home__title span {
  display: block;
  color: var(--first-color);
}

.home__description, 
.home__button {
  font-weight: 600;
}

.home__description {
  color: var(--title-color);
  margin-bottom: 1.5rem;
}

.home__button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 1.5rem .25rem;
  box-shadow: 0 8px 20px hsla(2, 100%, 45%, .28);
  transition: background .4s;
}

.home__button:hover {
  background-color: var(--first-color-alt);
}

.home__images {
  position: relative;
  width: 325px;
  height: 378px;
  justify-self: center;
}

.home__images img {
  position: absolute;
}

.home__liquid {
  max-width: initial;
  width: 370px;
  left: -1.5rem;
  bottom: 4rem;
}

.home__juice {
  width: 150px;
  box-shadow: 0 8px 24px rgba(9, 9, 9, 0.596);
  transform: rotate(15deg);
  left: -0.5rem;
  right: 0;
  top: 1.2rem;
  margin: 0 auto;
  animation: float-juice 4s ease-in-out infinite;
}

.home__apple2 {
  width: 80px;
  right: 2rem;
  bottom: 4.5rem;
}

.home__apple1 {
  width: 90px;
  transform: rotate(-25deg);
  top: 7rem;
  left: -3rem;
}

.home__leaf:nth-child(1), 
.home__leaf:nth-child(6) {
  width: 80px;
  transform: rotate(30deg);
}

.home__leaf:nth-child(2), 
.home__leaf:nth-child(4), 
.home__leaf:nth-child(5) {
  width: 55px;
}

/* Move sheets into position */
.home__leaf:nth-child(1) {
  top: -5rem;
  right: 3rem;
}

.home__leaf:nth-child(2) {
  transform: rotate(-60deg);
  top: -1rem;
  left: .25rem;
}

.home__leaf:nth-child(3) {
  width: 60px;
  transform: rotate(-15deg);
  top: 8rem;
  right: .8em;
}

.home__leaf:nth-child(4) {
  bottom: 4.5rem;
  left: 3.5rem;
}

.home__leaf:nth-child(5) {
  transform: rotate(-30deg);
  bottom: 0;
  right: 5rem;
}

.home__leaf:nth-child(6) {
  bottom: -1rem;
  left: -3rem;
}

.home__shape-small, 
.home__shape-big {
  background-color: hsl(283, 62%, 91%);
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.home__shape-small {
  width: 200px;
  height: 200px;
  top: -5rem;
  left: -5rem;
}

.home__shape-big {
  width: 250px;
  height: 250px;
  top: 17rem;
  right: -8rem;
}

.home__shape-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: soft-light;
}





/*=============== ABOUT ===============*/

.section__about{
  padding: 5.5rem 0 1rem;
}

.container__about{
  max-width: 968px;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.grid__about{
  display: grid;
}

.about__container{
  row-gap: 2rem;
}

.about__img{
  width: 280px;
  justify-self: center;
  
}

.about__title{
  margin-bottom: 1rem;
}

.about__description{
  margin-bottom: 2rem;
}

.about__details{
  display: grid;
  row-gap: 1rem;
  margin-bottom: 2.5rem;
}

.about__details-description{
  display: inline-flex;
  column-gap: .5rem;
  font-size: .813rem;
}

.about__details-icon{
  font-size: 1rem;
  color: var(--first-color);
  margin-top: .15rem;
}

.button--flex{
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
}

.button--link{
  color: var(--first-color-alt);
  font-weight: var(--font-medium);
}

.button--link:hover .button__icon{
  transform: translateX(.25rem);
}


/*=============== Partners ===============*/
.container__partners{
    padding-top: 150px;
}

.slide {
  border: 1px solid rgb(252, 248, 252);
  background-color: rgb(252, 248, 252);
  border-radius: 15%;
}



.slick-slide{
    margin: 0 20px;
}
.slick-slide img{
    width: 100%;
}
.slick-slider{
    position: relative;
    display: block;
    box-sizing: border-box;
}
.slick-list{
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.slick-track{
    position: relative;
    top: 0;
    left: 0;
    display: block
}
.slick-slide{
    display: none;
    float: left;
    height: 100%;
    min-height: 1px;
}
.slick-slide img{
    display: block;
}
.slick-initialized .slick-slide{
    display: block;
}
.copy{
    padding-top: 250px;
}






/*=============== SERVICES ===============*/
.section__services {
  padding: 4.5rem 0 1rem;
}

.section__title, 
.section__subtitle {
  text-align: center;
}

.section__title {
  font-size: 1.25rem;
  color: var(--first-color);
  margin-bottom: 2rem;
}

.section__subtitle {
  display: block;
  font-size: .813rem;
  color: black;
}

.container__services {
  max-width: 968px;
  margin-left: 1rem;
  margin-right: 1rem;
}

.grid__services {
  display: grid;
  gap: 1.25rem;
}

.services__container {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding-top: 1rem;
}

.services__card {
  padding: 5rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(to top, #bdbcbfba, #c1cbe2c7), url(../img/pinkflower-removebg-preview.png) no-repeat top center;
}
.services__card2 {
  padding: 5rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(to top, #bdbcbfba, #c1cbe2c7), url(../img/yellowflower-removebg-preview.png) no-repeat top center;
}
.services__card3 {
  padding: 5rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(to top, #bdbcbfba, #c1cbe2c7), url(../img/blueflower-removebg-preview.png) no-repeat top center;
}
.services__card4 {
  padding: 5rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(to top, #bdbcbfba, #c1cbe2c7), url(../img/salmonflower-removebg-preview.png) no-repeat top center;
}


.services__title {
  font-size: 1.35rem;
  margin-bottom: 2.5rem;
  color: var(--text-color);
  text-align: center;
}

.services__button {
  color: var(--text-color);
  font-size: .9rem;
  display: flex;
  align-items: center;
  column-gap: .25rem;
  cursor: pointer;
  margin-left: 55%;
}

.services__button:hover .services__icon {
  transform: translateX(.25rem);
}

.services__icon {
  font-size: 1rem;
  transition: .4s;
}

.services__modal {
  position: fixed;
  inset: 0;
  background-color: hsla(var(--second-hue), 28%, 16%, 0.7);
  padding: 2rem 1rem;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: .4s;
  z-index: var(--z-modal);
}

.services__modal-content {
  position: relative;
  background-color: var(--body-color);
  padding: 4.5rem 1.5rem 2.5rem;
  border-radius: 1.5rem;
}

.services__modal-title, 
.services__modal-description {
  text-align: center;
}

.services__modal-title {
  font-size: 1rem;
  color: var(--first-color);
  margin-bottom: 1rem;
}

.services__modal-description {
  font-size: .813rem;
  margin-bottom: 2rem;
}

.services__modal-list {
  display: grid;
  row-gap: .75rem;
}

.services__modal-item {
  display: flex;
  align-items: flex-start;
  column-gap: .5rem;
}

.services__modal-icon {
  font-size: 1.5rem;
  color: var(--first-color);
}

.services__modal-info {
  font-size:  .813rem;
}

.services__modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--title-color);
  cursor: pointer;
}



/*Active modal*/
.active-modal {
  opacity: 1;
  visibility: visible;
}




/* Animation juice */
@keyframes float-juice {
  0% {
    transform: translateY(0) rotate(15deg);
  }
  50% {
    transform: translateY(-1.5rem) rotate(15deg);
  }
  100% {
    transform: translateY(0) rotate(15deg);
  }
}

/*=============== BREAKPOINTS ===============*/




@media screen and (max-width: 991px) {
  .services__button {
    color: var(--text-color);
    font-size: .9rem;
    display: flex;
    align-items: center;
    column-gap: .25rem;
    cursor: pointer;
    margin-left: 35%;
  }
}


/* For small devices */
@media screen and (max-width: 375px) {
  .container__about{
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .home__container {
    padding-top: 5rem;
    height: 100vh;
    display: grid;
    row-gap: 1rem;
  }

  .home__images {
    width: 245px;
    height: 320px;
  }
  .home__liquid {
    width: 250px;
    left: 0rem;
    bottom: 5rem;
  }
  .home__juice {
    width: 90px;
    top: 2.5rem;
    left: 1rem;
  }
  .home__apple1 {
    width: 85px;
    right: -2rem;
    top: 5rem;
  }
   
  .home__apple2 {
    width: 80px;
    right: -1.5rem;
    bottom: 4rem;
  }
  .home__leaf:nth-child(1), 
  .home__leaf:nth-child(6) {
    width: 70px;
  }
  .home__leaf:nth-child(2), 
  .home__leaf:nth-child(4), 
  .home__leaf:nth-child(5) {
    width: 60px;
  }

  .home__leaf:nth-child(1) {
    top: -2rem;
    right: 1rem;
  }
  .home__leaf:nth-child(2) {
    top: .5rem;
    left: -.70rem;
  }
  .home__leaf:nth-child(3) {
    width: 60px;
    top: 4rem;
    right: -2rem;
  }
  .home__leaf:nth-child(4) {
    bottom: 5rem;
    left: 3.5rem;
  }
  .home__leaf:nth-child(5) {
    right: 10rem;
  }
  .home__leaf:nth-child(6) {
    right: 10rem;

  }
  .services__container {
    grid-template-columns: repeat(1, 250px);
    justify-content: center;
    text-align: center;
  }
}



@media screen and (max-width: 445px) {
  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .services__modal-info {
    font-size: .6rem;
  }

  .home__container {
    padding-top: 4rem;
    height: 100vh;
    display: grid;
    row-gap: 1rem;
  }

  .home__images {
    width: 265px;
    height: 320px;
  }
  .home__liquid {
    width: 330px;
    left: -2.3rem;
    bottom: 3rem;
  }
  .home__juice {
    width: 140px;
    top: 1rem;
    left: .5rem;
  }
  .home__apple1 {
    width: 85px;
    right: -3rem;
    top: 6rem;
  }
   
  .home__apple2 {
    width: 80px;
    right: -1.5rem;
    bottom: 1.5rem;
  }
  .home__leaf:nth-child(1), 
  .home__leaf:nth-child(6) {
    width: 70px;
  }
  .home__leaf:nth-child(2), 
  .home__leaf:nth-child(4), 
  .home__leaf:nth-child(5) {
    width: 60px;
  }

  .home__leaf:nth-child(1) {
    top: -4.5rem;
    right: 1rem;
  }
  .home__leaf:nth-child(2) {
    top: .5rem;
    left: -.70rem;
  }
  .home__leaf:nth-child(3) {
    width: 60px;
    top: 4rem;
    right: -2rem;
  }
  .home__leaf:nth-child(4) {
    bottom: 1.5rem;
    left: 5rem;
  }
  .home__leaf:nth-child(5) {
    right: 2.5rem;
    bottom: -2.5rem;
    display: none;
  }
  .home__leaf:nth-child(6) {
    left: -2rem;
    display: none;

  }
  .services__container {
    grid-template-columns: repeat(1, 250px);
    justify-content: center;
    text-align: center;
  }

  .services__button {
    color: var(--text-color);
    font-size: .9rem;
    display: flex;
    align-items: center;
    column-gap: .25rem;
    cursor: pointer;
    margin-left: 55%;
  }
  
}


@media screen and (min-width: 576px) {

  .services__container {
    grid-template-columns: repeat(2, 200px);
    justify-content: center;
  }
  .services__modal-content {
    width: 500px;
    padding: 4.5rem 2.5rem 2.5rem;
  }
  .services__modal-description {
    padding: 0 3.5rem;
  }

}


/* For medium devices */
@media screen and (max-width: 767px) {
  .about__img{
    width: 330px;
    justify-self: center;
    margin-bottom: -150px;
  }
}



@media screen and (min-width: 767px) {
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__toggle, 
  .nav__close, 
  .nav__img {
    display: none;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
  }
  

  .home__container {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-items: center;
    column-gap: 4rem;
    padding-top: 4rem;
  }
  .about__container {
    grid-template-columns: repeat(2, 1fr);
  }
 

}



@media screen and (min-width: 992px) {
  
  .container__about{
    margin-left: auto;
    margin-right: auto;
  }

  .section__about{
    padding: 8rem 0 1rem;
  }

  .about__img{
    width: 380px;
  }

  .section__services {
    padding: 6.5rem  0 1rem;
  }
  .services__container {
    grid-template-columns: repeat(3, 272px);
    column-gap: 3rem;
  }
  .container__services {
    margin-left: auto;
    margin-right: auto;
  }
  .services__card {
    padding: 5rem 2rem 1.5rem;
    text-align: center;
  }
  .services__car2 {
    padding: 5rem 2rem 1.5rem;
    text-align: center;
  }
  .services__card3 {
    padding: 5rem 2rem 1.5rem;
    text-align: center;
  }
  .services__card4 {
    padding: 5rem 2rem 1.5rem;
    text-align: center;
  }

  .section__title {
    margin-bottom: 3.5rem;
  }

}

/* For large devices */
@media screen and (min-width: 1224px) {
  .home__images {
    width: 530px;
    height: 590px;
    top: 1.3rem;
  }

  .about__container{
    column-gap: 7rem;
  }

  .services__container {
    grid-template-columns: repeat(4, 272px);
    column-gap: 3rem;
  }

  .home__liquid {
    width: 630px;
  }
  .home__juice {
    width: 270px;
    left: 3rem;
    top: 1rem;
  }
  .home__apple1 {
    width: 150px;
    top: 10rem;
  }
  .home__apple2 {
    width: 135px;
    right: -1.5rem;
    bottom: 5.5rem;
  }

  .home__leaf:nth-child(1), 
  .home__leaf:nth-child(6) {
    width: 70px;
  }
  .home__leaf:nth-child(2), 
  .home__leaf:nth-child(4), 
  .home__leaf:nth-child(5) {
    width: 60px;
  }

  .home__leaf:nth-child(1) {
    top: -1rem;
    right: 2rem;
  }
  .home__leaf:nth-child(2) {
    top: 2.5rem;
    left: 2.25rem;
  }
  .home__leaf:nth-child(3) {
    width: 60px;
    top: 12rem;
    right: -2rem;
  }
  .home__leaf:nth-child(4) {
    bottom: 8rem;
    left: 4.5rem;
  }
  .home__leaf:nth-child(5) {
    right: 10rem;
  }
  .home__leaf:nth-child(6) {
    bottom: 1rem;
    left: -8rem;
  }

  .home__shape-small {
    width: 400px;
    height: 400px;
    top: 0;
    left: -15rem;
  }
  .home__shape-big {
    width: 500px;
    height: 500px;
    top: 22rem;
    right: -14rem;
  }
}

@media screen and (min-width: 1048px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
}
<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
       
        <!--=============== REMIXICONS ===============-->
        <link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">

        <!--=============== BOXICONS ===============-->
        <link href='https://unpkg.com/boxicons@2.1.1/css/boxicons.min.css' rel='stylesheet'>
        
        <!--=============== CSS ===============-->
        <link rel="stylesheet" href="assets/css/styles.css">
        <link rel="stylesheet" href="assets/css/scroll_nav.css">

        <title>Safe</title>

        <link rel="apple-touch-icon" href="assets/img/SafeChoice.png">
        

        <meta name="theme-color" content="hsl(196, 60%, 91%)">
        
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="yes">
        
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js"></script>
    



    </head>
    <body>

        <div id="pageloader"></div>


        <!--==================== HEADER ====================-->
        <header class="header" id="header">
            <nav class="nav container" >
                <a href="#" class="nav__logo">
                    Safe<span></span>
                </a>

                <div class="nav__menu" id="nav-menu">
                    <ul class="nav__list">
                        <li class="nav__item">
                            <a href="#" class="nav__link active-link">Home</a>
                        </li>
                        <li class="nav__item">
                            <a href="#" class="nav__link">About</a>
                        </li>
                        <li class="nav__item">
                            <a href="#" class="nav__link">Services</a>
                        </li>
                        <li class="nav__item">
                            <a href="#" class="nav__link">Contact</a>
                        </li>
                    </ul>

                    <div class="nav__close" id="nav-close">
                        <i class="ri-close-line"></i>
                    </div>

                    <img src="assets/img/nav-img.png" alt="Nav image" class="nav__img">
                </div>

                <!-- Toggle button -->
                <div class="nav__toggle" id="nav-toggle">
                    <i class="ri-menu-line"></i>
                </div>
            </nav>
        </header>

        <!--==================== MAIN ====================-->
        <main class="main">

            <!--==================== HOME ====================-->
            <section class="home">
                <div class="home__shape-small"></div>
                <div class="home__shape-big"></div>
                <img src="https://st.depositphotos.com/1244201/3732/i/950/depositphotos_37326627-stock-photo-grey-grainy-plaster-background.jpg" alt="" class="home__shape-bg">

                <div class="home__container container">
                    <div class="home__data">
                        <h1 class="home__title">
                            Providing
                            <span>Safe</span>
                            Products 24/7
                        </h1>
                        <p class="home__description">
                            Stay safe at all times.
                        </p>
                        <a href="#" class="home__button">
                            Details
                        </a>
                    </div>
    
                    
                    
            </section>
<!--=============== End of Home ===============-->

<br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/>


        </main>


        <script>
    
            $(document).ready(function(){
                $('.customer-logos').slick({
                    slidesToShow: 6,
                    slidesToScroll: 1,
                    autoplay: true,
                    autoplaySpeed: 1000,
                    arrows: false,
                    dots: false,
                    pauseOnHover:false,
                    responsive: [{
                        breakpoint: 768,
                        settings: {
                            slidesToShow: 4
                        }
                    }, {
                        breakpoint: 520,
                        settings: {
                            slidesToShow: 3
                        }
                    }]
                });
            });
        
            </script>
        

        <script>
            var loader = document.getElementById("pageloader");
          
            window.addEventListener("load", function(){
              loader.style.display = "none";
            })
          </script>


     

        <!--=============== GSAP ===============-->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/gsap.min.js"></script>

        
        <!--=============== MAIN JS ===============-->
        <script src="assets/js/main.js"></script>
        <script src="assets/js/scroll_nav.js"></script>
    </body>
</html>


Solution

  • Switch the texture image to a with the texture as the background-image (the background image will repeat down the whole page). Also, give the body position: relative. This should work it worked for me after someone suggested it. Give it a try and see if it works.

    /*=============== GOOGLE FONTS ===============*/
    @import url("https://fonts.googleapis.com/css2?family=Lemon&family=Open+Sans:wght@400;600&display=swap");
    
    /*=============== VARIABLES CSS ===============*/
    :root {
      --header-height: 3.5rem;
    
      /*========== Colors ==========*/
      /*Color mode HSL(hue, saturation, lightness)*/
      --first-color: #38afff;
      --first-color-alt: hsl(204, 94%, 52%);
      --title-color: hsl(233, 32%, 15%);
      --text-color: hsl(233, 4%, 35%);
      --body-color: #daeef6;
    
      --first-hue: 250;
      --sat: 66%;
      --lig: 75%;
      --second-hue: 219;
    
      /*========== Font and typography ==========*/
      /*.5rem = 8px | 1rem = 16px ...*/
      --body-font: 'Open Sans', sans-serif;
      --second-font: 'Lemon', cursive;
      --biggest-font-size: 2.25rem;
      --normal-font-size: .938rem;
    
      /*========== z index ==========*/
      --z-tooltip: 10;
      --z-fixed: 100;
      --z-modal: 1000;
    }
    
    
    /* Page Loader */
    #pageloader {
        background: #ede3f6 url(../img/SafeChoice.png) no-repeat center center;
        height: 100vh;
        width: 100%;
        position: fixed;
        z-index: 10000;
        background-size: 20%;
      
        
      }
      
    img {
      -khtml-user-select: none;
      -o-user-select: none;
      -moz-user-select: none;
      -webkit-user-select: none;
      user-select: none;
      pointer-events: none
    
    }
    
    /* Responsive typography */
    @media screen and (min-width: 1224px) {
      :root {
        --biggest-font-size: 3.5rem;
        --normal-font-size: 1rem;
      }
    }
    
    /*=============== BASE ===============*/
    * {
      box-sizing: border-box;
      padding: 0;
      margin: 0;
    }
    
    body {
      font-family: var(--body-font);
      font-size: var(--normal-font-size);
      background: #daeef6;
      color: var(--text-color);
      overflow-x: hidden;
    }
    
    ul {
      list-style: none;
    }
    
    a {
      text-decoration: none;
    }
    
    img {
      max-width: 100%;
      height: auto;
    }
    
    /*=============== REUSABLE CSS CLASSES ===============*/
    .container {
      max-width: 1024px;
      margin-right: 1.5rem;
      margin-left: 1.5rem;
    }
    
    .main {
      overflow: hidden; /* For the animations */
      z-index: 5;
    }
    
    /*=============== HOME ===============*/
    .home,
    .home__container{
      position: relative;
    }
    
    .home__container {
      padding-top: 8rem;
      height: 100vh;
      display: grid;
      row-gap: 1rem;
    }
    
    .home__title {
      font-size: var(--biggest-font-size);
      font-family: var(--second-font);
      color: var(--title-color);
      margin-bottom: .75rem;
    }
    
    .home__title span {
      display: block;
      color: var(--first-color);
    }
    
    .home__description, 
    .home__button {
      font-weight: 600;
    }
    
    .home__description {
      color: var(--title-color);
      margin-bottom: 1.5rem;
    }
    
    .home__button {
      display: inline-block;
      background-color: var(--first-color);
      color: #fff;
      padding: 1rem 2rem;
      border-radius: 1.5rem .25rem;
      box-shadow: 0 8px 20px hsla(2, 100%, 45%, .28);
      transition: background .4s;
    }
    
    .home__button:hover {
      background-color: var(--first-color-alt);
    }
    
    
    .home__shape-small, 
    .home__shape-big {
      background-color: hsl(283, 62%, 91%);
      position: absolute;
      border-radius: 50%;
      filter: blur(100px);
    }
    
    .home__shape-small {
      width: 200px;
      height: 200px;
      top: -5rem;
      left: -5rem;
    }
    
    .home__shape-big {
      width: 250px;
      height: 250px;
      top: 17rem;
      right: -8rem;
    }
    
    .home__shape-bg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      mix-blend-mode: soft-light;
    }
    
    #page-background {
      background: url(https://st.depositphotos.com/1244201/3732/i/950/depositphotos_37326627-stock-photo-grey-grainy-plaster-background.jpg);
    }
    body {
      position: relative;
    }
    <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
           
            <!--=============== REMIXICONS ===============-->
            <link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
    
            <!--=============== BOXICONS ===============-->
            <link href='https://unpkg.com/boxicons@2.1.1/css/boxicons.min.css' rel='stylesheet'>
            
            <!--=============== CSS ===============-->
            <link rel="stylesheet" href="assets/css/styles.css">
            <link rel="stylesheet" href="assets/css/scroll_nav.css">
    
            <title>Safe</title>
    
            <link rel="apple-touch-icon" href="assets/img/SafeChoice.png">
            
    
            <meta name="theme-color" content="hsl(196, 60%, 91%)">
            
            <meta name="apple-mobile-web-app-capable" content="yes">
            <meta name="apple-mobile-web-app-status-bar-style" content="yes">
            
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
            <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js"></script>
        
    
    
    
        </head>
        <body>
      <div id="page-background" class="home__shape-bg"></div>
            <div id="pageloader"></div>
    
    
            <!--==================== HEADER ====================-->
           
    
            <!--==================== MAIN ====================-->
            <main class="main">
    
                <!--==================== HOME ====================-->
                <section class="home">
    
                    <div class="home__container container">
                        <div class="home__data">
                            <h1 class="home__title">
                                Providing
                                <span>Safe</span>
                                Products 24/7
                            </h1>
                            <p class="home__description">
                                Stay safe at all times.
                            </p>
                            <a href="#" class="home__button">
                                Details
                            </a>
                        </div>
        
                        
                        
                </section>
    <!--=============== End of Home ===============-->
    
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    <br/><br/><br/><br/><br/>
    
    
    
            </main>
    
    
            <script>
        
                $(document).ready(function(){
                    $('.customer-logos').slick({
                        slidesToShow: 6,
                        slidesToScroll: 1,
                        autoplay: true,
                        autoplaySpeed: 1000,
                        arrows: false,
                        dots: false,
                        pauseOnHover:false,
                        responsive: [{
                            breakpoint: 768,
                            settings: {
                                slidesToShow: 4
                            }
                        }, {
                            breakpoint: 520,
                            settings: {
                                slidesToShow: 3
                            }
                        }]
                    });
                });
            
                </script>
            
    
            <script>
                var loader = document.getElementById("pageloader");
              
                window.addEventListener("load", function(){
                  loader.style.display = "none";
                })
              </script>
    
    
         
    
           
    
            
            <!--=============== MAIN JS ===============-->
            <script src="assets/js/main.js"></script>
            <script src="assets/js/scroll_nav.js"></script>
        </body>
    </html>