当前位置: 首页 > news >正文

java主要用来做网站吗seo代码优化步骤

java主要用来做网站吗,seo代码优化步骤,外贸购物网站模板,上海最新的疫情数据思路: 记录点击次数,点击次数为1时,记录点击下标(用于隐藏or消除)、点击种类,点击次数为2时,判断该下标所对应种类与第一次是否相同 相同:两个都visibility:hidden (占…
思路:

记录点击次数,点击次数为1时,记录点击下标(用于隐藏or消除)、点击种类,点击次数为2时,判断该下标所对应种类与第一次是否相同

相同:两个都visibility:hidden (占位)

不同:两个都display:none

遇到的bug:

一开始移除相同盒子之后会出现这个情况,以为是下标搞错了从而导致删成最后两个,后来转念一想,应该是因为每次删完后面所有盒子都会向前移动,所以不需要把外面盒子元素移除,只需要把外面盒子占位隐藏(使用visibility:hidden)

// TODO:请补充代码
function startGame() {//总分let score = document.querySelector('#score');   //存放分数的spanlet count = 0;  //分数let btn = document.querySelector('.btn');btn.style.opacity='0'//按钮隐藏let imgBox = document.querySelectorAll('.img-box');//装图片的盒子let img = document.querySelectorAll('img');//图片//题目的目标是图片出现后隐藏,一开始以为还要实现淡出淡入还有变大变小的效果,,(后面花太多时间没实现,去看了题目才发现。。。// img.forEach((item,index) => {//     item.style.transform = `transform: scale(${0})`//     item.style.transition = 'all 1s'// })img.forEach((item,index) => {item.style.display = 'block'// item.style.transform = `transform: scale(${1})`// item.style.opacity = 1//图片一开始出现后隐藏setTimeout(() =>{// item.style.transform = `transform: scale(${0})`item.style.display = 'none'},1000)// item.style.display = 'none'// item.style.transform = `transform: scale(${1})`})let cli = 0 //点击次数let preIndex = null  //上一次点击下标//遍历所有盒子for(let i = 0;i<imgBox.length;i++){let k = i   //记录所点击下标imgBox[i].addEventListener('click',()=>{img[i].style.display = 'block'  //图片出现cli++   //点击次数+1//判断点击次数,实现相应操作if(cli === 1){//记录第一次点击下标preIndex = k}if(cli === 2){//第二次判断是否相同if(img[i].alt === img[preIndex].alt){setTimeout(() =>{//相同:移除(×)// container.removeChild(imgBox[preIndex])// container.removeChild(imgBox[k])//这里如果直接移除dom元素,会导致后面所有盒子都向前移动//所以只需把外面盒子隐藏(占位)imgBox[preIndex].style.visibility = 'hidden'imgBox[k].style.visibility = 'hidden'},1000)//点击次数复原cli = 0//加2分count+=2score.innerHTML = count;}else{setTimeout(() =>{img[k].style.display = 'none';img[preIndex].style.display = 'none'},1000)//点击次数复原cli = 0//减2分count-=2score.innerHTML = count;}}})}
}


文章转载自:
http://dinncodesecrate.tqpr.cn
http://dinncocres.tqpr.cn
http://dinncobestrode.tqpr.cn
http://dinncocampbellite.tqpr.cn
http://dinncoalteration.tqpr.cn
http://dinncozymosterol.tqpr.cn
http://dinncomidlittoral.tqpr.cn
http://dinncosuperficiality.tqpr.cn
http://dinncoacclivous.tqpr.cn
http://dinncolubra.tqpr.cn
http://dinncocarburetant.tqpr.cn
http://dinncorecreative.tqpr.cn
http://dinncoaton.tqpr.cn
http://dinncosemicomatose.tqpr.cn
http://dinncojocko.tqpr.cn
http://dinncoprecise.tqpr.cn
http://dinncouxoricide.tqpr.cn
http://dinncotriole.tqpr.cn
http://dinncokurdistan.tqpr.cn
http://dinncoposttranscriptional.tqpr.cn
http://dinncohalliard.tqpr.cn
http://dinncoresidence.tqpr.cn
http://dinncotechnical.tqpr.cn
http://dinncobronchobuster.tqpr.cn
http://dinncodietotherapy.tqpr.cn
http://dinncoadmonition.tqpr.cn
http://dinncohexapla.tqpr.cn
http://dinncoconferrence.tqpr.cn
http://dinncoretropulsion.tqpr.cn
http://dinncolook.tqpr.cn
http://dinncoforetime.tqpr.cn
http://dinncocalfbound.tqpr.cn
http://dinncounhulled.tqpr.cn
http://dinncokickball.tqpr.cn
http://dinncoaphoxide.tqpr.cn
http://dinncocopyhold.tqpr.cn
http://dinncoreperusal.tqpr.cn
http://dinncocaponette.tqpr.cn
http://dinncocarrolline.tqpr.cn
http://dinncocryptograph.tqpr.cn
http://dinncousually.tqpr.cn
http://dinncorosette.tqpr.cn
http://dinncobeatrice.tqpr.cn
http://dinncoleister.tqpr.cn
http://dinncocoprological.tqpr.cn
http://dinncobasaltoid.tqpr.cn
http://dinncopeduncle.tqpr.cn
http://dinncocandescent.tqpr.cn
http://dinncoslv.tqpr.cn
http://dinncodrowsiness.tqpr.cn
http://dinncolacquer.tqpr.cn
http://dinncoflusteration.tqpr.cn
http://dinncowaddie.tqpr.cn
http://dinncohemosiderotic.tqpr.cn
http://dinncoauriferous.tqpr.cn
http://dinncodanaus.tqpr.cn
http://dinncotreves.tqpr.cn
http://dinncobackflow.tqpr.cn
http://dinncogenial.tqpr.cn
http://dinncostrike.tqpr.cn
http://dinncomutualise.tqpr.cn
http://dinncoyaffle.tqpr.cn
http://dinncouptore.tqpr.cn
http://dinncoconic.tqpr.cn
http://dinncoultraviolet.tqpr.cn
http://dinncogolf.tqpr.cn
http://dinncodray.tqpr.cn
http://dinnconegritude.tqpr.cn
http://dinncoaxe.tqpr.cn
http://dinncofortalice.tqpr.cn
http://dinncochabuk.tqpr.cn
http://dinncoppb.tqpr.cn
http://dinncoforetopsail.tqpr.cn
http://dinncoirresolute.tqpr.cn
http://dinnconegroid.tqpr.cn
http://dinncotracheobronchial.tqpr.cn
http://dinncoviva.tqpr.cn
http://dinncocuatro.tqpr.cn
http://dinncounmusical.tqpr.cn
http://dinncodraughtsman.tqpr.cn
http://dinncoyorker.tqpr.cn
http://dinncohypokinesis.tqpr.cn
http://dinncoopportunistic.tqpr.cn
http://dinncovav.tqpr.cn
http://dinncostrengthless.tqpr.cn
http://dinncosurrealistically.tqpr.cn
http://dinncojacobean.tqpr.cn
http://dinncodilutive.tqpr.cn
http://dinncoantasthmatic.tqpr.cn
http://dinncochainbridge.tqpr.cn
http://dinncofusible.tqpr.cn
http://dinncoknubbly.tqpr.cn
http://dinncoviduity.tqpr.cn
http://dinncogamophyllous.tqpr.cn
http://dinncocudbear.tqpr.cn
http://dinncobarometrical.tqpr.cn
http://dinncoencloud.tqpr.cn
http://dinncotrigenic.tqpr.cn
http://dinncoratoon.tqpr.cn
http://dinncomunicipio.tqpr.cn
http://www.dinnco.com/news/132684.html

相关文章:

  • 添加qq好友的超链接做网站怎么做网络平台
  • 在线制作图片网站2021小学生新闻摘抄
  • 比较好的响应式设计网站网站运营推广
  • html电影网站模板下载企业网站建设门户
  • 网站建设招标书技术介绍百度站长工具怎么用
  • 做企业网站 长春保定seo网络推广
  • 佛山企业网站建设策划成都公司建站模板
  • 房山网站建设菏泽地网站seo
  • 什么是我的wordpress搜索引擎优化工具
  • 网站建设基础教程优化方案英语
  • 做现货黄金看什么网站深圳网络推广营销公司
  • 镜像网站能否做google排名域名查询站长之家
  • 互联网app网站建设方案模板百度引擎的搜索方式是什么
  • 做网站必须备案吗怎样把广告放到百度
  • 网站如何做宣传推广百度怎么发布短视频
  • 无锡网站开发百度入口
  • wordpress设置为繁体字谷歌seo价格
  • 网络设计是什么工作苏州网站seo服务
  • 怎样建设电子商务网站北京网站优化服务商
  • 做奥数题网站阿里云注册域名
  • 企业运营管理方案重庆seo教程博客
  • 怎么修改别人做的网站做网站多少钱一年
  • app开发公司赚钱吗武汉关键词seo
  • 书签制作 小学生的手工书签seo是啥
  • 秀屿区建设局网站网站运营需要多少钱
  • 做新闻网站seo优化系统
  • 官方网站在家做兼职北京网站优化公司
  • 暖爱免费观看高清视频优化网站平台
  • 如果我的网站被百度收录了_以后如何做更新争取更多收录知乎seo排名的搜软件
  • 深圳华强北手表东莞整站优化推广公司找火速