分类 代码 下的文章

调用网易云音乐

本站代码

<iframe frameborder="no" 
  border="0" 
  marginwidth="0" 
  marginheight="0" 
  width=100% 
  height=520 
  src="//music.163.com/outchain/player?type=0&id=436473389&auto=1&height=430">
</iframe>

阅读全文

jQuery - 响应式回顶部按钮

js 代码

$(document).ready(function($){
    // browser window scroll (in pixels) after which the "back to top" link is shown
    var offset = 300,
        //browser window scroll (in pixels) after which the "back to top" link opacity is reduced
        offset_opacity = 800,
        //duration of the top scrolling animation (in ms)
        scroll_top_duration = 700,
        //grab the "back to top" link
        $back_to_top = $('.cd-top');
    //hide or show the "back to top" link
    $(window).scroll(function(){
        ( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
        if( $(this).scrollTop() > offset_opacity ) { 
            $back_to_top.addClass('cd-fade-out');
        }
    });
    //www.sucaijiayuan.com
    //smooth scroll to top
    $back_to_top.on('click', function(event){
        event.preventDefault();
        $('body,html').animate({
            scrollTop: 0 ,
            }, scroll_top_duration
        );
    });
});

阅读全文

JS - console.log - 网页的小彩蛋

JS

console.log('\n %c 一个小白 %c  © 小尾巴 http://xiaowiba.com \n\n',
'color:#FFFFFB;background:#1abc9c;padding:5px 0;border-radius:.5rem 0 0 .5rem;',
'color:#FFFFFB;background:#080808;padding:5px 0;border-radius:0 .5rem .5rem 0;');