cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <div class="layout">
<div class="thumb-next" style="background-image: url(https://d2buyft38glmwk.cloudfront.net/new-stacks/media/__sized__/stacks_image/mast-DA-s6-first-look-DA6.44422-crop-c0-5__0-5-1600x901.jpg);"><p>></p> 
</div><br>
  
  <p class="layout-p">Hover above, please.</p>
  <p class="desc">Designed for use on a single image carousel slide show, hovering over this previous or next button reveals a thumbnail preview of the image that will appear full-sized on click. Some crazy javascript is included to implement with owl-carousel. Live example available at <a href="http://www.pbs.org/downton">pbs.org/downton</a>.</p>
</div> 
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600,600italic,300italic,300,700,700italic|Tinos:400,400italic,700,700italic|Playfair+Display:400italic);
$base-font-family: 'Tinos', serif;
$fancy-font-family: 'Playfair Display', georgia, serif;
$color-4: #ecb438;

body{
  background-color:#000;
}

a:link, a:visited, a:active{
  color:#fff;
  text-decoration:none;
  font-weight:bold;
}

a:hover{
  text-decoration:underline;
}
.layout{
  position: relative;
  height:500px;
  width:180px;
  margin: 40px auto 0 auto;
  .desc{
    opacity:.5;
    text-align: justify;
    font-size:12px;
    color:#fff;
    font-family:arial;
    letter-spacing:2px;
     word-spacing:0px;
    line-height:24px;
    padding:0;
    margin-top:35px;
  }
  .layout-p{
    display:block;
    width:100%;
    text-align:center;
    opacity:.6;
    font-size:16px;
    color:$color-4;
    font-family: $fancy-font-family;
    margin-top:100px;
    margin-left:-8px;
    clear: all;
    font-style:italic;
  }
}


.thumb-next{
        position: absolute;
        left: 50px;
        top: 40px;
        content:'';
        display:block;
        opacity:.7;
        width:50px;
        height:50px;
        /*position: absolute;
        left: -85px;
        top: -1px;*/
        border-radius:50%;
        opacity:.7;
        background:transparent;
        background-size:cover;
        background-position: -150% 0;
        background-repeat: no-repeat;
        border: 2px solid $color-4;
         -webkit-transition: all .4s ease-in-out;
          -moz-transition: all .4s ease-in-out;
          -ms-transition: all .4s ease-in-out;
          -o-transition: all .4s ease-in-out;
          transition: all .4s ease-in-out;
        p{
            font-family: $base-font-family;
            
            text-indent: 0;
            color:$color-4;
            font-size: 30px;
            padding: 8px 22px;
            margin:0;
            margin-left:-4px;
            line-height: 1.2em;
            transform:scale(1,1.5); /* W3C */
            -webkit-transform:scale(1,1.5); /* Safari and Chrome */
            -moz-transform:scale(1,1.5); /* Firefox */
            -ms-transform:scale(1,1.5); /* IE 9 */
            -o-transform:scale(1,1.5);
        }
        &:hover{
          cursor:pointer;
            border-radius:50px;
            opacity:1;
            background-position: 20% 0;
            width:68px;
            height:68px;
            left: 45px;
            top: 35px;
            p{
                font-size:0;
            }
        }
}
            
          
!
            
              $(".thumb-next").on('mouseleave', function() {
  $(".layout-p").text("Hover above, please.");
});

$(".thumb-next").on('mouseenter', function() {
  $(".layout-p").text("thank you.");
});

/******Crazy javascript to use buttons with owl carousel******/


/*function updateNext (x) {
                var active = $(".owl-page.active").index();
                var slide = $(".owl-item");
                var total = slide.length;
                for (var i = 0; i < slide.length; i++) {
                    var pos = i;

                    if ((active == pos) && (total-1 == pos)){
                      var nextImage = $(slide[0]).find(".lazyOwl").attr("src");
                      $(slide[i]).parent().parent().siblings().find(".thumb-next").attr('style','background-image: url('+nextImage+');');
                    }else if (active == pos){
                        if ($(slide[i+1]).find(".lazyOwl").attr("data-src")){
                            var nextImage = $(slide[i+1]).find(".lazyOwl").attr("data-src");
                        } else {
                             var nextImage = $(slide[i+1]).find(".lazyOwl").attr("src");
                        }
                      $(slide[i]).parent().parent().siblings().find(".thumb-next").attr('style','background-image: url('+nextImage+');');
                    }
                };
            }

            function updatePrev (x) {
                var active = $(".owl-page.active").index();
                var slide = $(".owl-item");
                var total = slide.length;
                for (var i = 0; i < slide.length; i++) {
                    var pos = i;

                    if ((active == pos) && (0 == pos)){
                      // var prevImage = $(slide[total-1]).find(".lazyOwl").attr("data-src");
                       if ($(slide[total-1]).find(".lazyOwl").attr("data-src")){
                            var prevImage = $(slide[total-1]).find(".lazyOwl").attr("data-src");
                        } else {
                             var prevImage = $(slide[total-1]).find(".lazyOwl").attr("src");
                        }
                      $(slide[i]).parent().parent().siblings().find(".thumb-prev").attr('style','background-image: url('+prevImage+');');
                    }else if (active == pos){
                        if ($(slide[i-1]).find(".lazyOwl").attr("data-src")){
                            var prevImage = $(slide[i-1]).find(".lazyOwl").attr("data-src");
                        } else {
                             var prevImage = $(slide[i-1]).find(".lazyOwl").attr("src");
                        }
                      $(slide[i]).parent().parent().siblings().find(".thumb-prev").attr('style','background-image: url('+prevImage+');');
                    }
                };
            }

            $(".owl-buttons .owl-prev").prepend('<div class="thumb-prev"><p><</p></div>');
            $(".owl-buttons .owl-next").append('<div class="thumb-next"><p>></p></div>');

            $('.owl-carousel').each(function(){
                 $(updateNext());
                 $(updatePrev());
            });

            $(".owl-buttons div div").on('click touchend', function() {
                var slideshow = $(this).parent().parent().parent().parent();
                $(updateNext(slideshow));
                $(updatePrev(slideshow));
            });*/
            
          
!
999px
Loading ..................

Console