Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html class="page" lang="ru">

<head>
  <title>Portfolio</title>
</head>
<body> 
  <div class="preloader" id="load">
    <div class="preloader__block">
      <div class="preloader__logo">
        <img src="https://www.pinclipart.com/picdir/big/336-3368555_html-css-javascript-icons-clipart.png" alt="Custom image" class="logo" />
      </div>
      <p class="preloader__txt"><span class="count">100</span><span>%</span></p>
    </div>
    <div class="preloader__svg"><svg class="preloader__forsp" id="sp_cell" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 752 1338">
        <path class="preload_path" d="M 1441 801 V 1 H 1 V 801 Z M 1 407 V 1 H 1441 V 801 H 1 Z">
          <animate class="cell_loading" attributeName="d" repeatCount="indefinite" dur="6s" values="M1,1337H751V1H1ZM207.07,412.74C304.73,340.44,412.27,357,430,360c117.21,20,179.49,104.87,197.36,130.07,18.11,25.55,58.72,84.53,58.49,167.68C685.48,786.58,587.37,867,568,882.89,543.52,903,465,965.32,353,957c-104.87-7.78-196.91-74.34-240.13-164.19-40.7-84.58-25.73-164-19.93-192.5C99.06,570.19,119.4,477.65,207.07,412.74Z; M1,1337H751V1H1ZM179.9,447.29C209,424.37,303.16,350.05,428,371c104.38,17.51,164.47,90.6,187,118,27.91,34,98.26,119.51,77.58,224.83C676.12,797.63,612,846.12,578.45,870.14,551.86,889.2,466.26,950.56,352,936c-108.76-13.9-171.8-88.47-197.47-118.46C122.66,780.25,53.61,699.57,71,600,84.53,522.52,142.91,476.47,179.9,447.29Z; M1,1337H751V1H1ZM190.76,455.52c28.4-22.77,118-94.66,241-79,111,14.17,174.5,92.12,187.38,108.44,13.92,17.63,83.7,110.22,59,230.5C658.67,810,593,862.8,568,882.89c-23,18.47-102.86,82.74-217.85,72.81-131-11.32-203.08-109.91-213.76-125.05-22.07-31.26-77.28-121.06-48.92-227C109.3,522.16,167,474.62,190.76,455.52Z; M1,1337H751V1H1ZM207.07,412.74C304.73,340.44,412.27,357,430,360c117.21,20,179.49,104.87,197.36,130.07,18.11,25.55,58.72,84.53,58.49,167.68C685.48,786.58,587.37,867,568,882.89,543.52,903,465,965.32,353,957c-104.87-7.78-196.91-74.34-240.13-164.19-40.7-84.58-25.73-164-19.93-192.5C99.06,570.19,119.4,477.65,207.07,412.74Z"></animate>
          <animate class="cell_loaded" attributeName="d" begin="indefinite" repeatCount="1" dur="1.2s" values="M1,1337H751V1H1ZM207.07,412.74C304.73,340.44,412.27,357,430,360c117.21,20,179.49,104.87,197.36,130.07,18.11,25.55,58.72,84.53,58.49,167.68C685.48,786.58,587.37,867,568,882.89,543.52,903,465,965.32,353,957c-104.87-7.78-196.91-74.34-240.13-164.19-40.7-84.58-25.73-164-19.93-192.5C99.06,570.19,119.4,477.65,207.07,412.74Z; M1,1337H751V1H1ZM268.66,348.57C357.29,288.68,460,219.24,551.27,248.21c68.81,21.84,98.24,89.22,126.81,154.66,52.61,120.48,73.5,309.82-34.42,445.88C587.89,919.07,517.53,950.2,500.55,957.34,476.39,967.5,409,994.11,324.82,983.67,201.94,968.43,96.73,879.41,60.33,773.07,19.26,653.09,79,549.68,102,509.82,148,430.11,210.78,387.69,268.66,348.57Z; M1,1337H751V1H1ZM321.2,103.42C445.39,45.83,541.72,5.1,621.92,39.25,717.56,80,724.74,218.2,738.1,475.49c10.74,206.81,16.38,334.24-67.7,455.14-52.82,76-116.38,114.18-184.35,155.05-54.38,32.7-311,187-421.54,101.49C2.2,1139,45.84,1060.83,44,740.16,42.38,450.1,5.94,384.37,70,283.88,128,193,219,150.84,321.2,103.42Z; M3.38,1337H748.75V1H3.38ZM375.62,11.28c264.54-.16,276.56,2.24,293.47,11.52,113.12,62.12,70.58,227,73.81,663.06,2.91,391.74,39.3,535.86-70.21,605.48-54.19,34.45-130.35,35-282.67,36.2-166.36,1.27-249.54,1.85-309.67-36.2-113-71.51-72.2-218.68-72-646.61.17-404.62-36.21-559.82,72-620.28C99,14,112.84,11.44,375.62,11.28Z"></animate>
        </path>
      </svg><svg class="preloader__forpc" id="dt_cell" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1442 802">
        <path class="preload_path" d="M 1441 801 V 1 H 1 V 801 Z M 1 407 V 1 H 1441 V 801 H 1 Z">
          <animate class="cell_loading" attributeName="d" repeatCount="indefinite" dur="6.5s" values="M1441,801V1H1V801ZM550,555c-19.1-18.49-63.43-61.39-71-130-10.39-94.12,56.75-160.83,70-174,13.87-13.79,77.64-77.15,168-69,72.53,6.54,118,55.17,144,83,24.69,26.41,59.72,63.89,66,122,8.14,75.32-37.83,131.47-53,150-11.88,14.51-72.67,88.76-171,88C621.67,624.37,568.42,572.83,550,555Z; M1441,801V1H1V801ZM545,538c-28-35.45-79.31-100.47-64-179,14.91-76.5,83.51-116.95,126-142,38.19-22.52,84.72-49.95,143-40,68.54,11.7,107.49,67.29,127.3,95.55C891.65,293,936.78,359.6,925,450c-3,23.14-12.61,88.83-70,139-8,7-74,62.85-164,49C614.66,626.25,571.91,572.09,545,538Z; M1441,801V1H1V801ZM536,509c-19-31.13-54.23-88.63-39-159,16.74-77.39,82.86-116.82,110-133,26.51-15.81,89.53-53.39,166-35,80.64,19.4,140.84,91.57,152,167,9.89,66.87-20.93,121.32-40,155-12.49,22.06-30.3,52.76-66,79-14,10.32-68.67,50.21-138,41C599.76,613.2,554.69,539.55,536,509Z; M1441,801V1H1V801ZM525,511c-10.32-16.57-48.59-83.15-26-165,22.85-82.81,91-119.8,108-129,19.1-10.36,95.07-48,183-16,6,2.18,106.55,40.73,135,146,5.4,20,17.91,78.3-11,140-21.42,45.7-54.69,70.08-70,81-16.28,11.62-80.59,56-168,42C662.06,607.77,575.74,592.5,525,511Z; M1441,801V1H1V801ZM550,555c-19.1-18.49-63.43-61.39-71-130-10.39-94.12,56.75-160.83,70-174,13.87-13.79,77.64-77.15,168-69,72.53,6.54,118,55.17,144,83,24.69,26.41,59.72,63.89,66,122,8.14,75.32-37.83,131.47-53,150-11.88,14.51-72.67,88.76-171,88C621.67,624.37,568.42,572.83,550,555Z"></animate>
          <animate class="cell_loaded" attributeName="d" begin="indefinite" repeatCount="1" dur="2s" values="M1441,801V1H1V801ZM565,552c-15.86-16.83-52.49-56.8-62-121-11.06-74.61,21.64-130.76,32-147,5.89-9.24,71.9-109.1,182-102,83.74,5.4,133,68.83,144,83,52.31,67.37,46.61,141.93,45,158-6.67,66.66-41.73,111.2-59,130-16.75,18.23-67.56,73.52-144,72C632.45,623.6,586.41,574.72,565,552Z; M1441,801V1H1V801ZM507,490c-43.86-56.77-97-125.59-76-198,19.37-66.66,90.19-97,116-108,110.21-47.15,216.64,3.29,243,17,33.19,17.27,111.3,57.38,135,146,3.22,12,22.88,90.52-23,163-27.41,43.31-64.65,63.4-83,73-18.68,9.78-89.43,43.59-172,20C579.39,583.68,543.46,537.19,507,490Z; M1441,801V1H1V801ZM437,492C308.22,394.14,243.59,343.93,232,281c-10.06-54.64,3-126.92,49-173,137.78-137.91,474.5,55.73,514,79,100.62,59.27,132.69,108.86,147,152,6.9,20.79,27,92.46-10,162-27.41,51.46-71.71,74.69-99,89-13.72,7.19-79.32,40.15-164,32C639.72,619.18,592.18,609.91,437,492Z; M1441,801V1H1V801ZM322,488c-95.75-69.11-175.5-128.34-174-209,1.76-95.07,115.29-160.75,133-171,191.82-111,440.44,0,530,40,62.72,28,156.48,102.67,344,252,131.29,104.55,183.77,155.59,174,207-10.2,53.67-83.24,81.54-128,98-184.08,67.68-365.33,10.93-530-43C557.1,624.7,439.28,572.65,322,488Z; M1441,801V1H1V801ZM158,583c-26.63-24.09-91.49-84.35-116-183.94C13.34,282.62,46.35,138.77,134.06,63.91,224.5-13.3,314,33.31,719,81c373.69,44,454,22.75,548.19,113.7C1341,266,1406.75,390.38,1395,529c-3.69,43.55-10.23,120.69-62,179-76.24,85.87-187,59.33-677,7.89C378,686.7,264.8,679.63,158,583Z; M1441,801V1H1V801ZM18,722c-32.31-51.78-2.92-81.21,1-320C23.09,153-7.87,125.41,26,73,96.52-36.12,273.41,15.83,709,18c454.25,2.27,640.74-52.52,713,62,25.24,40,8.83,56.73,8,307-.94,283.87,20.43,299.38-7,342-76,118.07-263.87,53.94-771,56C255,786.61,83.57,827.08,18,722Z; M1441,801V1H1V801ZM1,407V1H1441V801H1Z;"></animate>
        </path>
      </svg></div>
  </div>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</body>
  
</html>
              
            
!

CSS

              
                body {
  display: flex;
  flex-direction: column;  
  margin: 0;
  min-height: 100%;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
  color: #00000;
  background-color: #fffff;
  position: relative;
  width: 100%;
  height: 100%;
}

.preloader{width:100%;height:100%;position:fixed;top:0;left:0;z-index:9999;background-color:#fff}.preloader:before{content:'';width:100%;height:0%;position:absolute;bottom:0;left:0;z-index:1;background-color:#7e70c7;-webkit-transition:height 5000ms cubic-bezier(.215,.61,.355,1),border-radius 3000ms cubic-bezier(.215,.61,.355,1);transition:height 5000ms cubic-bezier(.215,.61,.355,1),border-radius 3000ms cubic-bezier(.215,.61,.355,1);border-radius:80% 100% 0 0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.preloader:after{content:'';width:100%;height:0;position:absolute;top:0;left:0;z-index:-1;background-color:#7e70c7}.preloader__block{width:400px;height:110px;position:absolute;top:10px;left:0;right:0;bottom:0;z-index:50;margin:auto;opacity:0}.preloader__logo{width:200px;margin:0 auto 25px;font-family:'Alice',serif;font-size:70px;text-align:center;color:#fff;text-shadow:rgba(105,0,204,.6) 1px 0,rgba(105,0,204,.6) 1px 1px,rgba(105,0,204,.6) 0 1px,rgba(105,0,204,.6) -1px 1px,rgba(105,0,204,.6) -1px 0,rgba(105,0,204,.6) -1px -1px,rgba(105,0,204,.6) 0 -1px,rgba(105,0,204,.6) 1px -1px;line-height:1}.preloader__logo img{width:100%;height:auto}.preloader__txt{font-size:60px;line-height:60px;letter-spacing:0;text-align:center;color:#fff;text-shadow:rgba(105,0,204,.6) 1px 0,rgba(105,0,204,.6) 1px 1px,rgba(105,0,204,.6) 0 1px,rgba(105,0,204,.6) -1px 1px,rgba(105,0,204,.6) -1px 0,rgba(105,0,204,.6) -1px -1px,rgba(105,0,204,.6) 0 -1px,rgba(105,0,204,.6) 1px -1px}.preloader__txt span{font-weight:800}.preloader svg{width:1440px;height:800px;fill:#fff;stroke:#6900cc;stroke-miterlimit:10;stroke-width:5px;position:absolute;top:50%;left:50%;z-index:10;opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(1.1);transform:translate3d(-50%,-50%,0) scale(1.1)}.preloader.on .preloader__block{opacity:1;-webkit-transition:opacity 500ms linear;transition:opacity 500ms linear}.preloader.on2 svg{opacity:1;-webkit-transform:translate3d(-50%,-50%,0) scale(1);transform:translate3d(-50%,-50%,0) scale(1);-webkit-transition:all 3000ms cubic-bezier(.19,1,.22,1),opacity 300ms linear;transition:all 3000ms cubic-bezier(.19,1,.22,1),opacity 300ms linear}.preloader.on3:before{height:60%}.preloader.on4:before{height:100%;border-radius:0 0 0 0;-webkit-transition:height 3000ms cubic-bezier(.215,.61,.355,1),border-radius 3000ms cubic-bezier(.215,.61,.355,1);transition:height 3000ms cubic-bezier(.215,.61,.355,1),border-radius 3000ms cubic-bezier(.215,.61,.355,1)}.preloader.on4:after{height:10%;-webkit-transition:height 3000ms cubic-bezier(.215,.61,.355,1),border-radius 3000ms cubic-bezier(.215,.61,.355,1);transition:height 3000ms cubic-bezier(.215,.61,.355,1),border-radius 3000ms cubic-bezier(.215,.61,.355,1)}.preloader__wide svg{width:100vw;height:55.6vw}.preloader__tall svg{width:182vh;height:102vh}


.preloader {
	 width: 100%;
	 height: 100%;
	 position: fixed;
	 top: 0;
	 left: 0;
	 z-index: 9999;
	 background-color: #fff;
}
 .preloader:before {
	 content: '';
	 width: 100%;
	 height: 0%;
	 position: absolute;
	 bottom: 0;
	 left: 0;
	 z-index: 1;
	 background-color: #7e70c7;
	 transition: height 5000ms cubic-bezier(0.215, 0.61, 0.355, 1), border-radius 3000ms cubic-bezier(0.215, 0.61, 0.355, 1);
	 border-radius: 80% 100% 0 0;
	 transform: translate3d(0, 0, 0);
}
 @media (max-width: 767px) {
	 .preloader:before {
		 border-radius: 40% 50% 0 0;
	}
}
 .preloader:after {
	 content: '';
	 width: 100%;
	 height: 0;
	 position: absolute;
	 top: 0;
	 left: 0;
	 z-index: -1;
	 background-color: #7e70c7;
}
 .preloader__block {
	 width: 400px;
	 height: 110px;
	 position: absolute;
	 top: 10px;
	 left: 0;
	 right: 0;
	 bottom: 0;
	 z-index: 50;
	 margin: auto;
	 opacity: 0;
}
 @media screen and (max-width: 767px) {
	 .preloader__block {
		 width: 250px;
	}
}
 .preloader__logo {
	 width: 200px;
	 margin: 0 auto 25px;
	 font-family: 'Alice', serif;
	 font-size: 70px;
	 text-align: center;
	 color: #fff;
	 text-shadow: rgba(105, 0, 204, .6) 1px 0, rgba(105, 0, 204, .6) 1px 1px, rgba(105, 0, 204, .6) 0 1px, rgba(105, 0, 204, .6) -1px 1px, rgba(105, 0, 204, .6) -1px 0, rgba(105, 0, 204, .6) -1px -1px, rgba(105, 0, 204, .6) 0 -1px, rgba(105, 0, 204, .6) 1px -1px;
	 line-height: 1;
}
 .preloader__logo img {
	 width: 100%;
	 height: auto;
}
 @media (max-width: 767px) {
	 .preloader__logo {
		 width: 120px;
		 margin: 0 auto 18px;
	}
}
 .preloader__txt {
	 font-size: 60px;
	 line-height: 60px;
	 letter-spacing: 0;
	 text-align: center;
	 color: #fff;
	 text-shadow: rgba(105, 0, 204, .6) 1px 0, rgba(105, 0, 204, .6) 1px 1px, rgba(105, 0, 204, .6) 0 1px, rgba(105, 0, 204, .6) -1px 1px, rgba(105, 0, 204, .6) -1px 0, rgba(105, 0, 204, .6) -1px -1px, rgba(105, 0, 204, .6) 0 -1px, rgba(105, 0, 204, .6) 1px -1px;
}
 .preloader__txt span {
	 font-weight: 800;
}
 @media screen and (max-width: 767px) {
	 .preloader__txt {
		 font-size: 42px;
		 line-height: 42px;
	}
}
 .preloader svg {
	 width: 1440px;
	 height: 800px;
	 fill: #fff;
	 stroke: rgba(105, 0, 204, );
	 stroke-miterlimit: 10;
	 stroke-width: 5px;
	 position: absolute;
	 top: 50%;
	 left: 50%;
	 z-index: 10;
	 opacity: 0;
	 transform: translate3d(-50%, -50%, 0) scale(1.1);
}
 @media screen and (max-width: 767px) {
	 .preloader svg {
		 width: 375px;
		 height: 668px;
	}
}
 .preloader.on svg {
	 opacity: 1;
	 transition: opacity 500ms linear;
}
 .preloader.on2 svg {
	 opacity: 1;
	 transform: translate3d(-50%, -50%, 0) scale(1);
	 transition: all 3000ms cubic-bezier(0.19, 1, 0.22, 1), opacity 300ms linear;
}
 .preloader.on3:before {
	 height: 60%;
}
 .preloader.on4:before {
	 height: 100%;
	 border-radius: 0 0 0 0;
	 transition: height 3000ms cubic-bezier(0.215, 0.61, 0.355, 1), border-radius 3000ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
 .preloader.on4:after {
	 height: 10%;
	 transition: height 3000ms cubic-bezier(0.215, 0.61, 0.355, 1), border-radius 3000ms cubic-bezier(0.215, 0.61, 0.355, 1);
}
 .preloader__wide svg {
	 width: 100vw;
	 height: 55.6vw;
}
 @media screen and (max-width: 767px) {
	 .preloader__wide svg {
		 width: calc(100vw + 10px);
		 height: 197vw;
	}
}
 .preloader__tall svg {
	 width: 182vh;
	 height: 102vh;
}
 @media screen and (max-width: 767px) {
	 .preloader__tall svg {
		 width: 58vh;
		 height: 102vh;
	}
}
 @media screen and (min-width: 768px) {
	 .preloader__forpc {
		 display: block;
	}
}
 @media screen and (max-width: 767px) {
	 .preloader__forpc {
		 display: none !important;
	}
}
 @media screen and (min-width: 768px) {
	 .preloader__forsp {
		 display: none !important;
	}
}
 @media screen and (max-width: 767px) {
	 .preloader__forsp {
		 display: block;
	}
}
              
            
!

JS

              
                

let wh = $(window).height();
let ww = $(window).width();
let bp = 767;

// IE
let ua = navigator.userAgent.toLowerCase();
let isMSIE = (ua.indexOf('msie') > -1) && (ua.indexOf('opera') == -1);
let isIE11 = (ua.indexOf('trident/7') > -1);
let isIEedge = (ua.indexOf('edge') > -1);
let isIE = isMSIE || isIE11;


$( document ).ready(function() {

  // preload
  setTimeout(function () {
    $("body").addClass("loaded");
  }, 10);

  if (ww > bp) {
    // PC
    if (ww > 1440) {
      if (ww / wh > 1.8) {
        $("#load").addClass("preloader__wide");
      } else {
        $("#load").addClass("preloader__tall");
      }
    } else if (wh > 800) {
      $("#load").addClass("preloader__tall");
    }
  }
  else {
    // SP
    if (ww > 375) {
      if (ww / wh > 0.561) {
        $("#load").addClass("preloader__wide");
      } else {
        $("#load").addClass("preloader__tall");
      }
    } else if (wh > 668) {
      $("#load").addClass("preloader__tall");
    }
  }

  $(window).on("load", function () {
    $("#load").addClass("on");

    setTimeout(function () {
      $("#load").addClass("on2");
    }, 200);

    setTimeout(function () {
      $("#load").addClass("on3");
    }, 400);

    setTimeout(function () {
      $("#load").addClass("on4");
    }, 3000);
    setTimeout(function () {
      $("#load .preloader__block").fadeOut(500);
    }, 3400);

    if (isIE || isIEedge) {
      setTimeout(function () {
      }, 5600);
      setTimeout(function () {
        $("#load").fadeOut(1500);
      }, 5800);
    }
    else {
      setTimeout(function () {
        expandCell();
      }, 5300);
      setTimeout(function () {
      }, 6600);
      setTimeout(function () {
        $("#load").fadeOut(800);
      }, 6800);
    }
    setTimeout(function () {
      animateVisible(".animate", 0);
    }, 7000);
  });
  
  $('.count').each(function () {
    $(this).prop('Counter',0).animate({
      Counter: $(this).text()
    }, {
      duration: 6500,
      easing: 'swing',
      step: function (now) {
        $(this).text(Math.ceil(now));
      }
    });
  });
});
                    
function expandCell() {
  // change the default path.
  $(".preload_path").each(function (i, o) {
    $(o).attr("d", "M1441,801V1H1V801ZM1,407V1H1441V801H1Z");
  });
  // End the loading animation.
  loading_cells = document.getElementsByClassName("cell_loading");
  for (var i = 0; i < loading_cells.length; i++) {
    loading_cells[i].endElement();
  }
  // Begin the loaded animation.
  loaded_cells = document.getElementsByClassName("cell_loaded");
  for (var i = 0; i < loaded_cells.length; i++) {
    loaded_cells[i].beginElement();
  }
}

function animateVisible (e, i) {
  let n = $(document).scrollTop();
  let s = wh;
  $(e).each(function (e, o) {
    let r, a = parseInt($(o).offset().top), l = parseInt($(o).height());
    r = $(o).data('shift') > 0 ? parseInt($(o).data('shift')) : i, n + s - r > a && n < a + l + r && $(o).addClass('animated');

    if ($(o).data('counts') && $(o).hasClass('animated')) {
      let countEl = $(o).children('.counts');
      countEl.prop('Counter',0).animate({
        Counter: countEl.text()
      }, {
        duration: 10000,
        easing: 'swing',
        step: function (now) {
          countEl.text(Math.ceil(now));
        }
      });
    }
  })
}

              
            
!
999px

Console