1. 首页 > 苹果CMS教程

苹果cmsV10播放器悬浮代码教程[苹果CMS教程]

苹果cmsV10播放器悬浮代码教程[苹果CMS教程]
在你的模板目录下
template/模板名称/html/index的include.html里加入如下代码:
PHP
<style type=“text/css”> .in { animation: ac 1s; } .out { position: fixed; bottom: 50%;(播放器位置) right: 1%;(播放器位置) z–index:999; animation: an 0.5s; } </style>
<script>window.jQuery || document.write(‘<script src=”/macplus/js/jquery-1.11.0.min.js”></script>’)</script>
<script type=“text/javascript”>
window.onload=function(){ var ha = ($(‘.MacPlayer’).find(‘table’).offset().top +$(‘.MacPlayer’).find(‘table’).height()); $(window).scroll(function(){ if ( $(window).scrollTop() > ha ) {$(‘.MacPlayer’).find(‘table’).removeClass(‘in’).addClass(‘out’);$(‘.MacPlayer’).find(‘table’).css(‘height’,‘200px’);(播放器大小) $(‘.MacPlayer’).find(‘table’).css(‘width’,‘350px’);(播放器大小) } else if ( $(window).scrollTop() < ha) { $(‘.MacPlayer’).find(‘table’).removeClass(‘out’).addClass(‘in’);$(‘.MacPlayer’).find(‘table’).css(‘height’,‘100%’); } }); }
</script>


有些模板可能没在include.html这个文件里清自行查找!jquery-1.11.0.min.js文件下载请到DPlayer播放器官方下载,也可以找我索取
存放路径:
PHP
  • /模板目录/js/jquery–1.11.0.min.js



本文采摘于网络,不代表本站立场,转载联系作者并注明出处:https://www.73as.com//pgjc/508.html