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

              
                <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Mukta" rel="stylesheet">


<div class="topnav">
  <div class="topnav-right">
    <a class="active" href="#home">Home</a>
    <a href="#news">Collections</a>
    <a href="#contact">Discover</a>
    <span class="social">
    <a href="#twitter"><i class="fab fa-twitter"></i></a>
    <a href="#fb"><i class="fab fa-facebook-f"></i></a>
    <a href="#insta"><i class="fab fa-instagram"></i></a>
    </span>
  </div>
</div>
<div class="main">
  <div class="header">
    <h1>
      Stylish ideas for your home
    </h1>
    <h2>
      Look for your inspiration on our site.<br> Fresh solutions every day.
    </h2>
  </div>

  <div class="side">

    <div class="txt">

    </div>
    <div class="boxes">
      <div class="first-line">
        <div id="f1">
          <div class="inside">
            <span></span>
            <h3>KITCHEN INTERIER</h3>
            <h4>
              Watch ideas!
            </h4>
          </div>
        </div>
      </div>
      <div class="second-line">
        <div id="f2">
          <div class="inside">
            <span></span>
            <h3>BEDROOM INTERIOR</h3>
            <h4>
              Watch ideas!
            </h4>
          </div>
        </div>
        <div id="f3">
          <div class="inside">
            <span></span>
            <h3>BATHROOM INTERIER</h3>
            <h4>
              Watch ideas!
            </h4>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="slidep">
    <!-- .slider>.slide*5{$} -->


    <div class="slider" style="--total: 5">
      <div id="slide-1" class="slide" style="--i:1" tabindex="0"><img src="http://cdn.home-designing.com/wp-content/uploads/2012/09/Brown-cream-living-room.jpeg">
        <div class="button">
          More
        </div>
      </div>
      <div id="slide-2" class="slide" style="--i:2" tabindex="0"><img src="https://imageresizer.static9.net.au/Eq2ZhMc_p_5VOLyDvY_50R3iscE=/1920x0/http%3A%2F%2Fprod.static9.net.au%2F_%2Fmedia%2FTV%2FT%2FThe-Block%2FSeason13%2FRoom-Reveals%2FH4-RM1-Bathroom-Sticks-Wombat-Low-res%2FH4-RM1-Bathroom-Sticks--Wombat05.jpg">
        <div class="button">
          More
        </div>
      </div>
      <div id="slide-3" class="slide" style="--i:3" tabindex="0"><img src="https://i.pinimg.com/originals/b7/48/98/b74898796fd9073ebd85ca9a6ce9d8b7.jpg">
        <div class="button">
          More
        </div>
      </div>
      <div id="slide-4" class="slide" style="--i:4" tabindex="0"><img src="https://www.bebitalia.com/sites/default/files/styles/original/public/04_B%26B_MichelClub.jpg?itok=SaSGHEou">
        <div class="button">
          More
        </div>
      </div>

      <nav class="slide-nav">
        <a href="#slide-1" tabindex="-1"><i class="far fa-dot-circle"></i></a>
        <a href="#slide-2" tabindex="-1"><i class="far fa-dot-circle"></i></a>
        <a href="#slide-3" tabindex="-1"><i class="far fa-dot-circle"></i></a>
        <a href="#slide-4" tabindex="-1"><i class="far fa-dot-circle"></i></a>
      </nav>
    </div>
  </div>
</div>

              
            
!

CSS

              
                body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}
*:target, *:focus{
  outline: none;
}

.topnav {
  overflow: hidden;
  z-index: 90;
  position: relative;
  width: 100%;
  background-color: rgba(0, 0, 0, .45);
  box-shadow: 0px 10px 40px -10px rgba(0,0,0,0.75);
}

.topnav a {
  float: left;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  min-width: 20px;
  transition: box-shadow 1s ease;
}

/* .topnav a:hover {
  background-color: #ddd;
  color: #2b2422;
  border-bottom: 1px solid #ddd;
} */

.topnav a:hover {
  box-shadow: inset 0 0 0 50px rgba(255, 255, 255, .2);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.topnav a.active {
  border-bottom: 1px solid gold;
}

.social {
  display: flex;
  width: 200px;
  background-color: #70665c;
}

.social a {
  flex: 1;
}

.topnav-right {
  float: right;
}

.main {
  margin-top: -49px;
  width: 100%;
  height: 100vh;
  flex-direction: row;
  display: flex;
}

.side {
  flex: 2;
  background: #70665c;
  display: flex;
  flex-direction: column;
}

.txt {
  flex: 1;
}

.header {
  position: absolute;
  z-index: 91;
  color: white;
  margin-left: 40px;
  margin-top: 100px;
  padding-left: 15px;
  border-left: 2px solid white;
  font-family: 'Mukta', sans-serif;
  letter-spacing: 1px;
}

.header h1 {
  font-size: 4vw;
  margin-top: -5px;
}

.header h2 {
  margin-top: -2vw;
  font-size: 80%;
  font-family: 'Montserrat', sans-serif;
}

.boxes {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.first-line {
  flex: 1;
  display: flex;
  flex-direction: row;
  width: 50%;
}

#f1 {
  background: #83726b;
  flex: 1;
  cursor: pointer;
  transition: box-shadow 1s ease;
}

#f1:hover {
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .4);
}

.second-line {
  flex: 1;
  display: flex;
  flex-direction: row;
}

#f2 {
  flex: 1;
  background: #7f636d;
  cursor: pointer;
  transition: box-shadow 1s ease;
}

#f2:hover {
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .4);
}

#f3 {
  flex: 1;
  background: #7d4850;
  cursor: pointer;
  transition: box-shadow 1s ease;
}

#f3:hover {
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .4);
}

.inside {
  width: 100%;
  height: Calc(100% - 40px);
  margin: 20px 0;
  text-align: center;
  vertical-align: middle;
  color: white;
}

.inside span {
  height: 1px;
  width: 30%;
  background: white;
  display: block;
  margin: 0 auto;
}

.inside h3 {
  font-size: 100%;
  position: relative;
  top: 30%;
  transform: translateY(-50%);
}

.inside h4 {
  font-size: 80%;
  color: #2b2422;
  position: relative;
  bottom: -30%;
  transform: translateY(-50%);
}

.slidep {
  background: silver;
  flex: 5;
  overflow: hidden;
}

/*SLIDESHOW*/

/* ---------------------------------- */

/* Essential Styles */

.slider {
  display: flex;
}

.slide {
  width: 100%;
  margin-right: -100%;
  position: relative;
  z-index: 1;
}

.slide:first-child {
  z-index: 2;
}

.slide:focus,
.slide:focus-within {
  z-index: 10;
}

/* ---------------------------------- */

/* Animation-based styles */

.slide {
  transition: all .6s cubic-bezier(.5, 0, .5, 1), z-index .7s linear;
  transform: translateX(-50%) scale(0.8);
  opacity: 0;
}

.slider:not(:focus-within) .slide:first-child,
.slide:focus,
.slide:focus-within {
  transform: translateX(0%) scale(1);
  opacity: 1;
  z-index: 10;
}

/* ---------------------------------- */

/* Stylistic Choices */

.slide {
  height: 100vh;
  display: flex;
  background: red;
  background: hsl( calc(360deg * ( var(--i) / var(--total))), 60%, 60%);
}

.slider {
  overflow: hidden;
}

.slide-nav {
  position: absolute;
  bottom: 30px;
  right: 50px;
  text-align: center;
  z-index: 12;
}

.button {
  position: absolute;
  bottom: 30px;
  left: 50px;
  text-align: center;
  z-index: 12;
  width: 100px;
  background-color: rgba(0, 0, 0, .4);
  color: white;
  font-size: 100%;
  height: 40px;
  cursor: pointer;
  line-height: 40px;
  font-family: 'Mukta', sans-serif;
  letter-spacing: 1px;
  transition: box-shadow 1s ease;
}

.button:hover {
  box-shadow: inset 0 0 0 50px rgba(255, 255, 255, .2);
}

.slide-nav a {
  display: inline-block;
  width: 1em;
  height: 1em;
  color: white;
  padding: 0 5px;
  border-radius: 50%;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 1rem;
  border: solid 2px transparent;
}

.slide-nav a:hover {
  color: silver;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*responsive*/

@media only screen and (max-width:950px) {
  .main {
    flex-direction: column;
    height:200vh;
  }
  .side {
    flex: 1;
  }
  .slidep {
    flex: 1;
  }
  .slide-nav {
  position: absolute;
  bottom: Calc(30px - 100vh);
  right: 50px;
  text-align: center;
  z-index: 12;
}
}

              
            
!

JS

              
                
              
            
!
999px

Console