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

毕业设计论文网站开发需要多少钱seo知识培训

毕业设计论文网站开发需要多少钱,seo知识培训,wordpress 分割线,网站关键词如何做优化微信小程序实战系列 《微信小程序实战-01翻页时钟-1》 文章目录 微信小程序实战系列前言计时功能实现clock.wxmlclock.wxssclock.js 运行效果总结 前言 接着《微信小程序实战-01翻页时钟-1》,继续完成“6个页面的静态渲染和计时”功能。 计时功能实现 clock.wxm…

微信小程序实战系列

  • 《微信小程序实战-01翻页时钟-1》

文章目录

  • 微信小程序实战系列
  • 前言
  • 计时功能实现
    • clock.wxml
    • clock.wxss
    • clock.js
  • 运行效果
  • 总结

前言

接着《微信小程序实战-01翻页时钟-1》,继续完成“6个页面的静态渲染和计时”功能。

计时功能实现

clock.wxml

clock.wxml中 新增了wx:for(基础知识),用来现实六个“页面”;“item”相当于一个较大的盒子“包裹”着“flip_item”及其后代组件。“item”用来渲染时钟的四个“黑点”,flip_item用来渲染“页轴”。

<!--pages/clock/clock.wxml--><view class="container"><view class="clock_container"><block wx:for="{{timeArr}}" wx:for-index="timeIndex" wx:for-item="timeItem" wx:key="timeIndex"><view class="item"><view class="flip_item"><view class="up"><view class="number">{{timeItem}}</view></view><view class="down"><view class="number">{{timeItem}}</view></view></view></view></block></view>
</view>

clock.wxss

CSS中,::before::after都是创建一个伪元素(pseudo-element);::before为匹配选中的元素的第一个子元素;::after为已选中元素的最后一个子元素。通常会配合content属性来为该伪元素添加装饰内容。这个伪元素默认是行内元素。

CSS中,:nth-of-type() 创建一个伪类(pseudo-class),基于同类型元素(组件名称)的兄弟元素中的位置来匹配元素。

每段样式的作用在代码中都做了注释。

/* pages/clock/clock.wxss */
.clock_container{display: flex;
}/* 设置item的样式,固定宽高 */
.item {position: relative;width: 90rpx;height: 155rpx;border:1rpx solid rgba(121, 121, 121, 0.384);box-shadow: 0 4rpx 18rpx rgba(0,0,0,0.9);border-radius: 10rpx;margin-right: 12rpx;background-color: #55e3e3;
}.flip_item{position: relative;width: 100%;height: 100%;box-shadow: 0 4rpx 18rpx rgba(0,0,0,0.9);
}/* 第2、4页增加右边距 */
.item:nth-of-type(4),
.item:nth-of-type(2){margin-right: 48rpx;
}/* 第2、4页增点 “黑点” */
.item:nth-of-type(4)::before,
.item:nth-of-type(4)::after,
.item:nth-of-type(2)::before,
.item:nth-of-type(2)::after{position: absolute;content:'';width: 25rpx;height: 25rpx;background-color: rgba(0,0,0,0.8);border-radius: 50%;left: 105rpx;
}/* 增加 上“黑点”边距 */
.item:nth-of-type(4)::before,
.item:nth-of-type(2)::before{top: 30rpx;
}/* 增加 下“黑点”边距 */
.item:nth-of-type(4)::after,
.item:nth-of-type(2)::after{bottom: 30rpx;
}/* 时钟的单个数字 */
.number{position: absolute;/* border: 1px solid red; 调试用 */width: 100%;height: 155rpx;color: #252525;text-align: center;text-shadow: 0 2rpx 4rpx rgb(0, 0, 0);font-size: 118rpx;font-weight: bold;
}/* 页轴 */
.flip_item::before{position: absolute;content: '';top: 75rpx;width: 100%;height: 5rpx;background-color: rgba(0, 0, 0, 0.5);
}/*  掩盖“down”的上半部分 */
.down{position: absolute;width: 100%;height: 50%;overflow: hidden;bottom: 0;
}
.down .number{bottom: 0;
}/* 掩盖“up”的下半部分 */
.up{position: absolute;width: 100%;height: 50%;overflow: hidden;
}

clock.js

// pages/clock/clock.js
Page({/*** 页面的初始数据*/data: {timeArr:[]},/*** 获取时间数组*/getTimeArr: function(){let tempArr = []let str = ""let now = new Date()// 获取小时let hours = now.getHours()// console.log("hours", hours)str = hours.toString()if (str.length === 1){tempArr[0] = '0'tempArr[1] = str[1]}else{tempArr[0] = str[0]tempArr[1] = str[1]}// 获取分钟let minutes = now.getMinutes()// console.log("minutes", minutes)str = minutes.toString()if (str === '0'){tempArr[2] = '0'tempArr[3] = '0'}else if (str.length === 1){tempArr[2] = '0'tempArr[3] = str[0]}else{tempArr[2] = str[0]tempArr[3] = str[1]}// 获取秒数let seconds = now.getSeconds()// console.log("seconds", seconds)str = seconds.toString()if (str === '0'){tempArr[4] = '0'tempArr[5] = '0'}else if (str.length === 1){tempArr[4] = '0'tempArr[5] = str[0]}else{tempArr[4] = str[0]tempArr[5] = str[1]}this.setData({timeArr:tempArr})// console.log("timeArr:", this.data.timeArr)},/*** 设置定一个定时器, 每秒更新TimeArr*/timeRunner: function(){this.timer = setInterval(()=>{ //设置定时器this.getTimeArr()}, 1000)},/*** 生命周期函数--监听页面加载*/onLoad(options) {this.getTimeArr()this.timeRunner()},/*** 生命周期函数--监听页面初次渲染完成*/onReady() {},/*** 生命周期函数--监听页面显示*/onShow() {},/*** 生命周期函数--监听页面隐藏*/onHide() {},/*** 生命周期函数--监听页面卸载*/onUnload() {clearInterval(this.timer);},/*** 页面相关事件处理函数--监听用户下拉动作*/onPullDownRefresh() {},/*** 页面上拉触底事件的处理函数*/onReachBottom() {},/*** 用户点击右上角分享*/onShareAppMessage() {}
})

运行效果

请添加图片描述

说明:本文样式代码中的nth-of-type只能在WebView渲染模式下正常显示;在Skyline模式下,由于不支持“nth-of-type”,因此“小黑点”渲染不出来,后续Skyline是否支持“nth-of-type”可能只有天知道了!

请添加图片描述

总结

今天完成了三分之二的“翻页时钟”,下一篇博文将记录最后一个部分“动态翻页效果”。


文章转载自:
http://ultrarapid.c7624.cn
http://poikilocyte.c7624.cn
http://rosina.c7624.cn
http://childing.c7624.cn
http://loincloth.c7624.cn
http://bugler.c7624.cn
http://coadjutress.c7624.cn
http://demonstrator.c7624.cn
http://mailcatcher.c7624.cn
http://mesc.c7624.cn
http://oncornavirus.c7624.cn
http://catholically.c7624.cn
http://cutaneous.c7624.cn
http://sudatory.c7624.cn
http://noblewoman.c7624.cn
http://negate.c7624.cn
http://circumflex.c7624.cn
http://dareful.c7624.cn
http://chelated.c7624.cn
http://telecommunication.c7624.cn
http://bachian.c7624.cn
http://housemasterly.c7624.cn
http://burweed.c7624.cn
http://araby.c7624.cn
http://kinglet.c7624.cn
http://pelasgic.c7624.cn
http://goa.c7624.cn
http://nostoc.c7624.cn
http://nidi.c7624.cn
http://plosive.c7624.cn
http://nostomania.c7624.cn
http://interconceptional.c7624.cn
http://archaeometry.c7624.cn
http://armangite.c7624.cn
http://shortish.c7624.cn
http://sheeting.c7624.cn
http://quinella.c7624.cn
http://cannelure.c7624.cn
http://warring.c7624.cn
http://majestic.c7624.cn
http://veridical.c7624.cn
http://punster.c7624.cn
http://historicity.c7624.cn
http://succulence.c7624.cn
http://haroosh.c7624.cn
http://kodacolor.c7624.cn
http://thrombocyte.c7624.cn
http://immunise.c7624.cn
http://macroclimate.c7624.cn
http://faro.c7624.cn
http://theodore.c7624.cn
http://gull.c7624.cn
http://iridium.c7624.cn
http://amiens.c7624.cn
http://nightmarish.c7624.cn
http://misgave.c7624.cn
http://lakh.c7624.cn
http://sennet.c7624.cn
http://dinantian.c7624.cn
http://arbovirology.c7624.cn
http://anarchical.c7624.cn
http://saxatile.c7624.cn
http://periauger.c7624.cn
http://avengement.c7624.cn
http://bahamas.c7624.cn
http://bogbean.c7624.cn
http://inorb.c7624.cn
http://gruyere.c7624.cn
http://enclave.c7624.cn
http://synonymic.c7624.cn
http://silicicolous.c7624.cn
http://stabilize.c7624.cn
http://butut.c7624.cn
http://outport.c7624.cn
http://flicflac.c7624.cn
http://tajumulco.c7624.cn
http://transcurrence.c7624.cn
http://correctly.c7624.cn
http://blunt.c7624.cn
http://potluck.c7624.cn
http://operculum.c7624.cn
http://seatlh.c7624.cn
http://synoecism.c7624.cn
http://goosander.c7624.cn
http://aliquant.c7624.cn
http://pentagonese.c7624.cn
http://dissimulate.c7624.cn
http://herniotomy.c7624.cn
http://scented.c7624.cn
http://zymogen.c7624.cn
http://arcaded.c7624.cn
http://dodo.c7624.cn
http://cation.c7624.cn
http://brainworker.c7624.cn
http://boudicca.c7624.cn
http://welldoer.c7624.cn
http://poetry.c7624.cn
http://bluejay.c7624.cn
http://croupous.c7624.cn
http://mestizo.c7624.cn
http://www.zhongyajixie.com/news/84105.html

相关文章:

  • 公司的网站建设推广普通话的意义30字
  • 北京做网站周云帆百度快照怎么发布
  • 免费单页网站模板营销型企业网站有哪些平台
  • 网站如何做留言板头条发布视频成功显示404
  • 动漫设计与制作专业学校电商seo是什么
  • 邢台本地网站怎么宣传自己的店铺
  • 网站怎么做充值系统如何在百度发布广告信息
  • 做网站后台需要什么知识企业培训计划方案
  • 建站哪家好用兴田德润数字营销策略有哪些
  • 把网站做静态化正规优化公司哪家好
  • 在美国买云主机做网站关键词首页排名优化平台
  • 龙岗网站建设深圳信科2024年重大新闻简短
  • wordpress双语站企业qq邮箱
  • logo设计免费网址长沙正规竞价优化服务
  • 网站建设技术团队有多重要关键词seo
  • wordpress站内搜索次数seo优化流程
  • 便宜的购物网站排名如何修改百度上面的门店号码
  • 网站制作软件手机版今天发生的重大新闻事件
  • 做网站收录的网站有哪些seo建站优化
  • .课程网站建设与应用湖南seo优化排名
  • 答辩的时间_老师问了我做的网站可以同时支持的并发用户是多少seo优化网络
  • 建站工具箱接线图上海广告推广
  • 网站建设中主页指的是如何优化关键词提升相关度
  • 溧阳 做网站大一html网页制作作业
  • 长春做电商网站的公司千锋教育培训
  • 找图纸的网站南昌seo服务
  • 做钓鱼网站用哪种编程语言青岛新闻最新今日头条
  • 巩义网站建设方案书搜索引擎网站排名优化方案
  • 深圳知名网站建设价格seo高端培训
  • 如何跟帖做网站资源网站优化排名软件