css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              
<body>
	<h1>Material Inspired Accordions</h1>
  <hr>
  <h3>Follow me on:
    <a href="https://www.linkedin.com/in/maruti-ram" target="_blank">
      <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/LinkedIn_Logo.svg/2000px-LinkedIn_Logo.svg.png" alt="linkedIn Logo" height="20" ></a>
  </h3>
  <h3> &nbsp;|&nbsp; Developed by <span>Maruti Ram</span></h3>
  <h3> &nbsp;|&nbsp; Get it from <a href="https://github.com/Maruti-Ram/Web-UI-Elements" target="_blank"><span>GitHub</span></a></h3>
    <div class="wrap">
        <article class="ui-card">
            <header>
                <h2 class="ui-card-title">Personal Details &amp; Contact Info.</h2>
                <div class="ui-card-trigger-icon">
                    <a href="#">
                        <i class="material-icons md-36">arrow_drop_down</i>
                    </a>
                </div>
                <div class="ui-card-info">
                    <i class="material-icons">access_time</i>
                    <span>Sub caption</span>
                </div>
            </header>
            <div class="ui-card-content">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                </p>
                <footer>
                    <a class="ui-card-footer-link" href="#">READ MORE</a>
                </footer>
            </div>
        </article>

        <article class="ui-card">
            <header>
                <h2 class="ui-card-title">Education Details</h2>
                <div class="ui-card-trigger-icon">
                    <a href="#">
                        <i class="material-icons md-36">arrow_drop_down</i>
                    </a>
                </div>
                <div class="ui-card-info">
                    <i class="material-icons">access_time</i>
                    <span>Sub caption</span>
                </div>
            </header>
            <div class="ui-card-content">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                </p>
            </div>
        </article>

        <article class="ui-card">
            <header>
                <h2 class="ui-card-title">Experience</h2>
                <div class="ui-card-trigger-icon">
                    <a href="#">
                        <i class="material-icons md-36">arrow_drop_down</i>
                    </a>
                </div>
                <div class="ui-card-info">
                    <i class="material-icons">access_time</i>
                    <span>Sub caption</span>
                </div>
            </header>
            <div class="ui-card-content">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
					nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
					fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                </p>
            </div>
        </article>

        <article class="ui-card">
            <header>
                <h2 class="ui-card-title">Certifications</h2>
                <div class="ui-card-trigger-icon">
                    <a href="#">
                        <i class="material-icons md-36">arrow_drop_down</i>
                    </a>
                </div>
                <div class="ui-card-info">
                    <i class="material-icons">access_time</i>
                    <span>Sub caption</span>
                </div>
            </header>
            <div class="ui-card-content">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
					nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
					eu fugiat nulla pariatur.
                </p>
            </div>
        </article>

        <article class="ui-card">
            <header>
                <h2 class="ui-card-title">Extra Curriculars</h2>
                <div class="ui-card-trigger-icon">
                    <a href="#">
                        <i class="material-icons md-36">arrow_drop_down</i>
                    </a>
                </div>
                <div class="ui-card-info">
                    <i class="material-icons">access_time</i>
                    <span>Sub caption</span>
                </div>
            </header>
            <div class="ui-card-content">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
					nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
					dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                </p>
            </div>
        </article>

        <article class="ui-card">
            <header>
                <h2 class="ui-card-title">Honors and Awards</h2>
                <div class="ui-card-trigger-icon">
                    <a href="#">
                        <i class="material-icons md-36">arrow_drop_down</i>
                    </a>
                </div>
                <div class="ui-card-info">
                    <i class="material-icons">access_time</i>
                    <span>Sub caption</span>
                </div>
            </header>
            <div class="ui-card-content">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
					nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
					eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                </p>
            </div>
        </article>


    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

    <script src="js/index.js"></script>

</body>

</html>

            
          
!
            
              $main: #F3F3F3
$button: #2700EF
$card-background: #FAFAFA
$card-border: #BDBDBD
$orange: #F4511E
$info-position: 28.1%

/* Center elements
=center($axis: "both")
  @if $axis == "both"
    top: 50%
    left: 50%
    transform: translate(-50%, -50%)
  @if $axis == "y"
    top: 50%
    transform: translateY(-50%)
  @if $axis == "x"
    left: 50%
    transform: translateX(-50%)

/* Material's Z-Depth
=zdepth($level: 1)
  @if $level == 1
    box-shadow: 0 3px 3px 0 rgba(0,0,0,0.1), 0 5px 5px 0 rgba(0,0,0,0.2)
  @if $level == 2
    box-shadow: 1px -1px 4px 3px rgba(0,0,0,0.2), 1px 3px 5px 4px rgba(0,0,0,0.2)
  @if $level == 3
    box-shadow: 0 5px 6px 3px rgba(0,0,0,0.2), 1px 5px 6px 5px rgba(0,0,0,0.2)

// Basics
body
  background: $main

h1
  font-size: 1.5em
  text-align: center
  padding: 0.3em
  font-family: "Roboto Slab"
  color: $orange

hr
  width: 15%
  border: 0
  border-top: 2px solid #494949
  margin-bottom: 1em

h3
  font-size: 1.1em
  display: inline-block
  font-family: "Maven Pro"
  position: relative
  left: $info-position
  top: -1em
  a
    text-decoration: none
  span
    color: red
  img
    position: relative
    top: 1.25em
    padding-bottom: 1em

.wrap
  display: block
  position: absolute
  width: 100%
  height: auto
  padding: 5px
  box-sizing: border-box
  +center(x)

.material-icons.md-18
  font-size: 18px
.material-icons.md-24
  font-size: 24px
.material-icons.md-36
  font-size: 36px
.material-icons.md-48
  font-size: 48px

// Card
.ui-card
  display: block
  position: relative
  width: 98%
  height: auto
  padding: 0.75em
  cursor: pointer
  box-sizing: border-box
  background: $card-background
  border-left: 0.2em solid $orange
  border-bottom: 0.1px solid $card-border
  transition: all .3s cubic-bezier(.55,0,.1,1)
  +center(x)
  +zdepth(1)

  > header
    display: block
    width: 100%
    height: 4em

  &:hover
    +zdepth(2)
    z-index: 2

  &:active
    +zdepth(3)
    border-bottom: 2px solid #FFF

  &:first-child
    border-top: 0.1px solid $card-border

  &.triggered
    margin: 7px 0 7px 0
    border-top: 3.5px solid $orange
    border-bottom: 1px solid #FFF
    border-left: 0
    z-index: 2
    +zdepth(3)
    a
      i
        transform: translate(-50%, -50%) rotate(-180deg)

    > header
      padding-bottom: 1em
      border-bottom: 1px solid #BDBDBD

    .ui-card-content
      max-height: 950px
      padding: 10px 10px 0 10px
      margin: 20px 0 00px 0
      visibility: visible
      overflow: initial
      opacity: 1

// Card Icon
.ui-card-icon
  display: block
  position: relative
  width: 80px
  height: 100%
  float: left
  margin: 0 10px 0 0
  border-radius: 100%
  background: #FFF
  overflow: hidden
  box-sizing: border-box

  i
    display: inline-block
    position: relative
    +center()



// Card Title
.ui-card-title
  display: inline-block
  width: 60%
  height: 18px
  padding: 0.3em
  margin: 3px 0 0 0
  overflow: hidden
  font-family: Roboto
  font-size: 1.2em
  text-overflow: ellipsis
  white-space: nowrap
  color: lighten(#000, 35%)

*
  outline: none !important

// Card Info
.ui-card-info
  display: block
  position: relative
  padding: 5px 5px 5px 0.3em
  width: 60%
  box-sizing: border-box
  color: lighten(#000, 60%)

  i
    font-size: 1.3em
    margin: 2px 5px 0 0
    float: left

  span
    display: inline-block
    margin: 5px 0 0 0
    font-family: Roboto
    font-size: 0.9em

// Card Action Button
.ui-card-trigger-icon
  display: block
  width: 3.5em
  height: 100%
  float: right
  color: lighten(#000, 65%)

  a
    display: block
    position: relative
    width: 100%
    height: 100%
    color: inherit
    text-decoration: none
    +center()

    i
      position: relative
      left: 50%
      top: 50%
      transition: all 0.3s ease-in-out
      transform: translate(-50%, -50%)

  &:hover
    background: darken($card-background, 5%)


// Card Content
.ui-card-content
  display: block
  position: relative
  max-height: 0px
  padding: 0px
  margin: 0 0 0 0
  box-sizing: border-box
  visibility: hidden
  overflow: hidden
  opacity: 0
  transition: all .3s cubic-bezier(.55,0,.1,1), overflow 0s linear

  .ui-card-content-img
    position: relative
    width: 450px
    height: auto
    margin: 0 0 15px -20px
    padding: 0 0 0 0
    opacity: 0
    transition: opacity .5s cubic-bezier(.4,.08,.14,.82)

  p
    margin: 0 0 20px 0
    font-family: 'Roboto'
    text-align: justify


.ui-card-footer-link
  display: inline-block
  position: relative
  left: 90%
  padding: 0.75em
  border-radius: 3px
  font-family: 'Roboto', serif
  text-decoration: none
  color: darken($button, 20%)
  transition: all .2s cubic-bezier(.4,.08,.14,.82)

  &:hover
    background: darken($card-background, 7%)

            
          
!
            
              $(function unfoldPost() {
  var triggerButton = $("header");

  triggerButton.on("click", function(e) {
    e.preventDefault();

    $(this).closest(".ui-card").toggleClass("triggered");
    $(this).closest(".ui-card-trigger-icon").toggleClass("triggered");

  });
});

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console