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

              
                mixin _data(d, c, n, j, p)
    .container.data(class= d)
        .abs-item.bg-header(class= c)
            .title
                h1= n
                p= j
        .abs-item.flexbox.about
            p= p
        .abs-item.social-media
            each brand in ['github', 'codepen', 'facebook-f', 'twitter', 'instagram']
                |
                |
                i.fab(class= 'fa-' + brand)
                    span= '@' + n

.box#box
    .container.front
        .flexbox.bg-welcome
            i.fas.fa-code
        .flexbox.welcome
            h1 Coders Team
            .btn-open(onclick= 'openBox()') Meet Our Members
    .container.back
        .flexbox.btn-close(onclick= 'closeBox()')
            i.fas.fa-times
        +_data('d1', 'member_1', 'david', 'DevOps Engineer', 'Aliquet enim tortor at auctor urna nunc id. Vitae purus faucibus ornare suspendisse sed nisi.')
        +_data('d2', 'member_2', 'yola', 'Product Designer', 'Nulla pellentesque dignissim enim sit amet. Urna duis convallis convallis tellus id interdum.')
        +_data('d3', 'member_3', 'jonnie', 'Social Engineer', 'Est ultricies integer quis auctor elit sed vulputate. Etiam non quam lacus suspendisse faucibus.')
        +_data('d4', 'member_4', 'ana', 'Python Developer', 'Accumsan in nisl nisi scelerisque eu ultrices vitae. Ligula ullamcorper malesuada proin libero.')
        +_data('d5', 'member_5', 'alonso', 'Back End Developer', 'Viverra vitae congue eu consequat ac felis. Ipsum faucibus vitae aliquet nec ullamcorper sit amet.')
        +_data('d6', 'member_6', 'sarah', 'Front End Developer', 'Turpis egestas maecenas pharetra convallis. In nisl nisi scelerisque eu ultrices vitae auctor.')
        +_data('d7', 'member_7', 'wilmar', 'Security Engineer', 'Vel pharetra vel turpis nunc eget lorem dolor sed viverra. Tempus quam pellentesque nec nam.')
        +_data('d8', 'member_8', 'windi', 'Java Developer', 'Ac turpis egestas integer eget aliquet nibh praesent tristique. Sed euismod nisi porta lorem.')
        .abs-item.carousel
            .flexbox.btn.prev(onclick= 'prev(-1)')
                i.fas.fa-caret-left
            .flexbox.btn.next(onclick= 'next(1)')
                i.fas.fa-caret-right
            .container.avatar
                - for(var i = 1; i < 9; i++)
                    .container(class= 'thumbnail_' + i)
                        |
                        |
                        span(class= 'member_' + i)
|
|
a.me(href='https://codepen.io/uzcho_/pens/popular/?grid_type=list' target='_blank')
              
            
!

CSS

              
                :root{
    --tr: translate(-50%, 0);
    --z1: translateZ(50px);
    --z2: translateZ(125px);
    --rt: 10px 10px 0 0;
    --rb: 0 0 10px 10px;
    --ry: rotateY(180deg);
    --ts: all .5s ease;
    --an: .5s ease both;
    --sh: 0 8px 6px -6px #333;
}

$avatar: 1 3084363, 2 3084299, 3 3084304, 4 3084315, 5 3084416, 6 3084278, 7 3084366, 8 3084309;

@each $list, $member in $avatar{
    .member_#{$list}{
        background: #eee url('https://www.flaticon.com/svg/static/icons/svg/3084/#{$member}.svg')$nrp
    }
}

.container{
    @include _dimension(100%);
    position: $ab
}

.abs-item{
    width: 100%;
    position: $ab
}

body, .flexbox{
    @include _flexbox($n, $rw, $n, $c)
}

body{
    font-family: 'Lato'
}

.box{
    @include _dimension(250px, 400px);
    position: $rl;
    transform-style: preserve-3d;
    transform: var(--ry);
    @include _animation(open, var(--an), to){
        transform: rotateY(360deg)
    }
    @include _pseudo-complete($bf, $bl, #eee, $n, $n, $n, $n, 100%){
        border-radius: 10px;
        transform: var(--z1)
    }
}

.front{
    transform: var(--z1)
}

.bg-welcome, .welcome{
    @include _dimension(100%, 50%);
    position: $rl
}

.bg-welcome{
    background: #000;
    color: #fff;
    font-size: 120px;
    border-radius: var(--rt)
}

.welcome{
    background: #eee;
    box-shadow: var(--sh);
    border-radius: var(--rb)
}

h1{
    font-size: 24px
}

p, .btn-open{
    font-size: 14px
}

.btn-open{
    @include _relative-box(#3f51b5, 50px 0 0 0, 16px, $n);
    color: #fff;
    cursor: pointer;
    border-radius: 50px;
    box-shadow: var(--sh);
    transition: var(--ts);
    &:hover{
        box-shadow: $no
    }
}

.back{
    transform: var(--ry) var(--z1)
}

.btn-close{
    @include _solid-box(#000, $n, 10px, $n, $n, 110px, 30px);
    position: $ab;
    color: #fff;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--ts)
}

.back:hover .btn-close{
    opacity: 1
}

.data{
    transition: var(--ts)
}

.bg-header{
    background-size: 100px;
    background-position: 150px $c;
    height: 130px;
    border-radius: var(--rt)
}

.title{
    padding: 0 6px;
    bottom: 14px;
    position: $ab;
    h1{
        text-transform: uppercase
    }
}

.about{
    @include _solid-box(#eee, 0 16px, 200px, $n, $n, $n, $n, 130px);
    text-align: $c
}

$theme: 1 #FF9100, 2 #5AB267, 3 #E62E2E, 4 #873F2E, 5 #4895FF, 6 #FF5F96, 7 #32393F, 8 #884DFF;

@each $list, $color in $theme{
    .d#{$list} .social-media{
        background: $color
    }
}

.social-media{
    @include _solid-box($n, 0 6px, $n, $n, 0, $n, $n, 70px);
    @include _flexbox($n, $rw, $n, $c, $spa);
    border-radius: var(--rb);
    i{
        position: $rl;
        color: #fff;
        font-size: 20px;
        z-index: 1;
        cursor: pointer
    }
    span{
        @include _solid-box(#000, 8px 4px, -40px, $n, $n, 50%, $n);
        position: $ab;
        @include _text(#fff, 400 12px 'Lato', $n);
        opacity: 0;
        border-radius: 4px;
        transition: var(--ts);
        transform: var(--tr);
        @include _pseudo-complete($bf, $bl, $n, $n, $n, -8px, 50%, $n){
            @include _arrow($bdl, $bdr, $bdt, 10px, #000);
            transform: var(--tr)
        }
    }
    i:hover span{
        opacity: 1
    }
}

.carousel{
    background: #cdd2ef;
    height: 70px;
    top: 130px;
    @include _pseudo-complete($bf, $bl, #000, 10px, $n, $n, 100px, 50px){
        border-radius: 50%
    }
}

.btn{
    @include _dimension(50px, 70px);
    position: $ab;
    font-size: 50px;
    z-index: 1;
    i{
        cursor: pointer
    }
}

.prev{
    left: 50px
}

.next{
    right: 50px
}

.avatar{
    transition: var(--ts);
    transform-style: preserve-3d;
    div{
        backface-visibility: hidden
    }
    span{
        background-size: cover;
        background-position: $c;
        @include _relative-box($n, 15px auto, $n, 40px);
        @include _layout($bl, $rl, $n);
        border-radius: 50%
    }
}

@for $t from 1 through 8{
    .thumbnail_#{$t}{
        transform: rotateY(45deg * ($t - 1)) var(--z2)
    }
}

.rotate-y180{
    transform: rotateY(0deg);
    @include _animation(close, var(--an), to){
        transform: var(--ry)
    }
}
              
            
!

JS

              
                const b = document.getElementById('box');

function openBox(){
    b.classList.add('rotate-y180')
}

function closeBox(){
    b.classList.remove('rotate-y180')
}

let slideIndex = 1;
showSlides(slideIndex);

function showSlides(n){
    let slides = document.getElementsByClassName('data');
    if(n > slides.length){
        slideIndex = 1
    }
    if(n < 1){
        slideIndex = slides.length
    }
    for(let i = 0; i < slides.length; i++){
        slides[i].style.opacity = '0'
    }
    slides[slideIndex-1].style.opacity = '1'
}

let carousel = document.querySelector('.avatar');
let count = 8;
let selected = 0;

function _Carousel(){
    let angel = selected / count * -360;
    carousel.style.transform = 'rotateY(' + angel + 'deg)'
}

function prev(n){
    showSlides(slideIndex += n);
    selected--;
    _Carousel()
}

function next(n){
    showSlides(slideIndex += n);
    selected++;
    _Carousel()
}
              
            
!
999px

Console