[自用门户]门户飘窗功能代码,加在最底部,body标签内就行
来源:互联网 发布:update mysql 编辑:程序博客网 时间:2024/06/10 10:51
http://note.youdao.com/noteshare?id=179e661d0d6a2de8519433faa8096e7b&sub=772E07EED8E2439082556119E2A46433
-----------------------------代码分割线---------------------------------------------------------
<!-- *****飘窗all-开始(包含css+html+js)***** --><!-- 飘窗样式 --><style type="text/css">.floatwindows{width:350px;height:260px;position: absolute;top: 100px;left: 0;z-index: 9999999999999;}.floatwindows .floatwindows_content{width:350px;height: 235px;position: absolute;overflow:hidden;}.floatwindows_content .i-close{position: absolute;right: 38px;top: 16px;width: 35px;height: 30px;}.floatwindows_content ul { position: absolute; left: 19%; top: 26%; width: 220px; height: 150px;}.floatwindows_content ul li{width: 200px;height: 100px;top: 30%;position: absolute;padding: 0 10px;}.floatwindows_content ul li a span{ word-wrap:break-word;/*white-space: pre-wrap;保留空白*//*overflow:visible; letter-spacing: 5px; */line-height: 25px;font-size:20px;font-weight: bold;color: #FED078;/*a标签变成块状然后居中*/display: block;text-align: center;}</style><!-- 飘窗页面前端html代码 --><div class="floatwindows" id="target" style=""> <!-- 飘窗内容及背景 --><div class="floatwindows_content" style=""><img width="350" src="${res}/images/i_pic.png" alt="" style="" ><!-- 关闭按钮 --><a class="i-close" href="javascript:;" style=""><!-- <img width="40" src="${res}/images/i_close.png "> --></a><!-- 飘窗内容 --><ul style=""><!--**配置栏目内容的值,channelId=""这里的值就是后台栏目的id,conunt="1"代表只显示1条数据 -->[@cms_content_list channelId='303' count='1' titLen='18' descLen='50' append='...' orderBy='2' channelOption='1' dateFormat='yyyy-MM-dd'] [#list tag_list as c] <li class="floatwindows_li" style=""><a href="${c.url}" title="${c.title}" target="_blank" style=""><span class="floatwindows_text" style="">[@text_cut s=c.title len=titLen append=append/]</span></a></li> [/#list] [/@cms_content_list] </ul> </div> </div> <!-- 飘窗js开始 --><script> $('.i-close').click(function () { $('#target').hide() }); $(function() { var i = j = 1; var e = $("#target"); var win = $(window); function intern() { var width = e.width(); var height = e.height(); var left = parseInt(e.css("left")); var top = parseInt(e.css("top")); var windowWidth = win.width(); var windowHeight = win.height(); if (windowWidth - width < (left + i)) { i = -i; } else if ((left + i) < 0) { i = -i; } if (windowHeight - height < (top + j)) { j = -j; } else if ((top + j) < 0) { j = -j; } e.css({ left: left + i, top: top + j }); } setInterval(intern, 40); });</script><!-- 飘窗js结束 --><!-- *****飘窗all-结束(包含css+html+js)***** -->
----------------分割线--------------------------------------------------------
效果图
1.操作。找到首页html页面,备份好,然后修改里面的内容(如需要加飘窗,复制代码在</body>前面),提交,记得改掉需要复制代码的channelId=""里面的值,改成需要显示的栏目如
2.(图片需要上传到配置-资源-default-images-上传文件)
以下为原背景图,
链接:https://share.weiyun.com/1fb8741df390638ad4bd74852f6c256b(密码:4rr0)
阅读全文
0 0
- [自用门户]门户飘窗功能代码,加在最底部,body标签内就行
- [自用门户]百度地图功能
- [自用门户]div居中显示,加在style里面
- [自用门户]飘窗
- [自用门户] 自适应站点
- 【自用门户】jeecms搭建
- [自用门户]原生js案例加class属性
- [自用门户]门户公告状态显示问题
- [自用门户]jeecms中搜索功能的代码片段_含单独搜索本栏目id的功能
- [门户自用]在div显示时间,年月日,星期
- [自用门户]jQuery 文档操作方法,了解prepend()用法:在标签开头加入由参数属性组成的内容
- [自用门户]锚点2,js平滑到顶端、底部、或者某个位置
- [自用门户]需求:公告发售结束时间大于当前时间时候,则在类加on,显示new图标(主要看js实现方法)
- [自用门户]当设置一个div,其子标签有属性,外层没有引起塌陷
- [门户自用]JEECMS v5版标签之[@cms_content_list],重点看orderby排序
- [自用]门户网站模板-招标公告
- [自用]门户网站模板-招标公告
- [自用门户]点击菜单变颜色
- Java通过几种经典的算法来实现数组排序
- 数据结构03 队列
- 四层树状数据展示,无样式
- 移动端车牌OCR识别
- UVA 159 Word Crosses
- [自用门户]门户飘窗功能代码,加在最底部,body标签内就行
- Ubuntu操作redis主从复制(读写分离)
- Linux+v4l2自动设置相机曝光时间
- 说点什么吧
- 计算机视觉与人的视觉
- 最大公因数,最小公倍数,因式分解(C/python略)
- Linux安装 VMware tools 工具的方法及启用共享文件的设置
- 线段树判一段里面有几段不同的颜色以及更新操作
- Mvp+RecyclerView+Okhttp