首页 / JS配置
JS配置

js file

var link1= `/search?title=%E8%87%AA%E8%B4%B8%E6%B8%AF` //上面这一行 反单引号 里面写横幅指向的链接 var link2= `/post/14478.html` //上面 反单引号 里面红色部分替换成中文简介链接 var link3= `/post/123456.html` //上面 反单引号 里面红色部分替换成英文简介链接 const text1 = `三亚学院“智能科学与技术”专业2019年经过教育部审批通过,根据三亚学院“人工智能+大数据”学科特色重点布局而设立。本专业以三亚学院高性能计算中心(超算中心)为平台,以工业互联网为核心,立足信息技术,融合数据智能,聚焦知识处理,培养掌握新一代人工智能技术的复合应用型专业技术人才。` const text2 = `计算机科学与技术专业成立于2005年,为海南省应用型转型专业,是中国顶尖民办大学专业,在海南省工学一流专业中排名第1。` const text3 = `软件工程专业成立于2005年,本专业以软件产业人才需求为导向,按照工程教育认证具体要求,以“行业+就业”为导向,经过13年的建设,已培养了大量软件专业人才。` const text4 = `数据科学与大数据技术专业是三亚学院为落实国家《促进大数据发展行动纲要》及学院“人工智能+大数据”学科特色重点布局而设立,2018年经过教育部批准后开始招生,培养方向为大数据分析和大数据可视化。` const text5 = `虚拟现实是利用电脑模拟产生一个三度空间的虚拟世界,提供使用者关于视觉、听觉、触觉等感官的模拟,让使用者如同身历其境一般,可以及时、没有限制地观察三度空间内的事物。` // 这五个 反单引号(`)中间的内容是 鼠标悬浮在专业图片上时显示的文字 //===================================================================== function fun0(){ $('header .lang a:first-child').attr('href', link2) $('header .lang a:last-child').attr('href', link3) } function fun4(){ // 设置横幅指向的链接: $('#bar a').attr('href', link1).attr('target','_blank') // $('#specialities>div').css('position', 'relative') $('#specialities>div:nth-child(1) a').append("<div class='desc'>" + text1 + "</div>") $('#specialities>div:nth-child(2) a').append("<div class='desc'>" + text2 + "</div>") $('#specialities>div:nth-child(3) a').append("<div class='desc'>" + text3 + "</div>") $('#specialities>div:nth-child(4) a').append("<div class='desc'>" + text4 + "</div>") $('#specialities>div:nth-child(5) a').append("<div class='desc'>" + text5 + "</div>") } $(function(){ $('head').append(`<style> #specialities .desc { background-color: rgb(15 82 216 / 75%); padding: 10px; line-height: 1.2; font-size: 1rem; position: absolute; top: 0px; bottom: 0px; left:0px; right: 0px; display: none; color: white; } #specialities>div:hover .desc { display: block; } #specialities>div{ position: relative; } /* 在这里补充css */ /* 页面底部二维码样式 */ #footer-info{ padding-left:130px; flex: 1; } #footer-qrcode{ width:130px; display:flex; } #footer-qrcode>div{ margin: 10px; width: 80px; position: relative; cursor: pointer; } #footer-qrcode>div .inner{ left: -64px; position: absolute; display: none; width: 128px; height: 128px; top: -130px; } #footer-qrcode>div:hover .inner{ display: block; } @media only screen and (max-width: 1170px) { #footer-qrcode>div:nth-child(1){ display: none; } #footer-qrcode{ width: 90px; } #footer-info{ padding-left: 0px; } } td{ border: 1px dashed #bbb; } </style>`) }) function fun1(){ $('main article p').css('background-color', 'transparent') $('#title > p:nth-child(3) span:first-child').css('margin-right', '20px') // 页面底部二维码 : var footer = $('#footer footer') var f1 = $('#footer footer>:nth-child(1)') var f2 = $('#footer footer>:nth-child(2)') var f3 = $('#footer footer>:nth-child(3)') var icon1 = 'http://iie.sanyau.edu.cn/oos/file/62b7320123888e90cb2f43bf.png' var icon2 = 'http://iie.sanyau.edu.cn/oos/file/62b7320123888e90cb2f43c0.png' var icon3 = 'http://iie.sanyau.edu.cn/oos/file/62b7320123888e90cb2f43c1.png' var qrcode1 = 'http://iie.sanyau.edu.cn/oos/file/62b7330123888e90cb2f43c2.png' var qrcode2 = 'http://iie.sanyau.edu.cn/oos/file/62b7330123888e90cb2f43c3.png' var qrcode3 = 'http://iie.sanyau.edu.cn/oos/file/62b7330223888e90cb2f43c4.png' var fstr = `<p style="border-bottom: 1px solid white; margin-bottom: 5px; padding-bottom: 5px;">` + f1.html() + `</div> <div style="display: flex;"> <div id='footer-info'> <div>`+f2.html()+`</div> <div>`+f3.html()+`</div> </div> <div id='footer-qrcode'> <div title='信智官网手机端' style="background: url('` + icon1 + `') no-repeat;"><div class='inner'><img width='100%' height='100%' src='` + qrcode1 + `'></div></div> <div title='信智学院抖音' style="background: url('` + icon2 + `') no-repeat;"><div class='inner'><img width='100%' height='100%' src='` + qrcode2 + `'></div></div> <div title='信智学院公众号' style="background: url('` + icon3 + `') no-repeat;"><div class='inner'><img width='100%' height='100%' src='` + qrcode3 + `'></div></div> </div> </div>` footer.html(fstr) } // 隐藏日期、三列改两列: function fun5(){ $('.time').css('display','none') $('.news-lists > :last-child').css('display', 'none') $('.news-list').css('width', '48%') $('.news-lists > :nth-child(2)').css('margin-right', '0') // 创建一个悬浮框元素 var adBox = document.createElement('div'); // 设置广告图片的样式 adBox.style.position = 'fixed'; adBox.style.top = '50%'; adBox.style.right = '0'; adBox.style.transform = 'translateY(-50%)'; adBox.style.zIndex='9999999'; // 添加广告图片 var adImage = document.createElement('img'); adImage.src = 'http://fx.sanyau.edu.cn/uploads/2023/06/280815165825.jpg'; adImage.alt = '2023年招生专栏'; adImage.style.width = '100px'; // 设置图片的宽度 adImage.style.height = 'auto'; // 设置图片的高度,保持宽高比 adImage.style.cursor= 'pointer';  // 将广告图片添加到悬浮框中 adBox.appendChild(adImage); // 设置点击事件,跳转到指定的网址 adImage.addEventListener('click', function () { window.location.href = 'http://iie.sanyau.edu.cn/list/25.html'; });   //添加关闭按钮 var close=document.createElement('div'); var gRight=document.createElement('div'); var gLeft=document.createElement('div'); close.style.position='absolute'; close.style.cursor= 'pointer';  close.style.display='inline-block'; close.style.background='red'; close.style.borderRadius='40px'; close.style.top='-7px'; close.style.left='-15px'; close.style.height='30px'; close.style.width='30px'; close.style.zIndex='10000000'; gRight.style.display='inline-block'; gRight.style.width='19px'; gRight.style.height='3px'; gRight.style.background='#fff'; gRight.style.lineHeight='0'; gRight.style.fontSize='0'; gRight.style.verticalAlign='middle'; gRight.style.WebkitTransform='rotate(45deg)'; gRight.style.position='absolute'; gRight.style.top='15px'; gRight.style.left='5px'; gLeft.style.position='absolute'; gLeft.style.top='12px'; gLeft.style.right='4px'; gLeft.style.content='/'; gLeft.style.display='inline-block'; gLeft.style.width='23px'; gLeft.style.height='3px'; gLeft.style.background='#fff'; gLeft.style.WebkitTransform='rotate(-35deg)'; close.appendChild(gRight); close.appendChild(gLeft); adBox.appendChild(close); close.addEventListener('click', function () { adBox.style.display='none'; close.style.display='none'; }); // 将悬浮框添加到网页的 body 元素中 document.body.appendChild(adBox); }