苹果cmsV10悬浮播放器制作教程
2025-03-12 共人阅读在你的模板目录下template/模板名称/html/index的include.html里加入如下代码:
<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%');
}
});
} - 专题搜索教程10热度
- 更换模板报错解决方法59热度
- 自定义标签使用教程62热度
- 视频筛选调用教程76热度
- 专题标签参数使用教程60热度
- 专题首页调用教程106热度
- 导航菜单调用方法145热度
- 常用的JS处理函数116热度
- 网址字段教程130热度
- JS获取用户登录状态代码213热度
