小程序小程序实例 | 加载样式index.wxml index.wxss .circle-line{ width: 100px; height: 100px; display: inline-block; position: relative; } .circle-line text{ display: block; width: 50%; height: 5px; opacity: .作者王明昌发布时间2018-12-22最后更新2018-12-22 index.wxml 复制 index.wxss 复制.circle-line{ width: 100px; height: 100px; display: inline-block; position: relative; } .circle-line text{ display: block; width: 50%; height: 5px; opacity: .7; position: absolute; top: calc(50% - 2.5px); left: 0px; transform-origin: center right; animation: circle 1.5s linear infinite; } .circle-line text::before{ content: ''; display: block; width: 15px; height: 5px; position: absolute; top: 0; right: 10px; background-color: blue; } .circle-line text:nth-child(1){ transform: rotate(0deg); animation-delay: 0.2s; } .circle-line text:nth-child(2){ transform: rotate(45deg); animation-delay: 0.4s; } .circle-line text:nth-child(3){ transform: rotate(90deg); animation-delay: 0.6s; } .circle-line text:nth-child(4){ transform: rotate(135deg); animation-delay: 0.8s; } .circle-line text:nth-child(5){ transform: rotate(180deg); animation-delay: 1s; } .circle-line text:nth-child(6){ transform: rotate(225deg); animation-delay: 1.2s; } .circle-line text:nth-child(7){ transform: rotate(270deg); animation-delay: 1.4s; } .circle-line text:nth-child(8){ transform: rotate(315deg); animation-delay: 1.6s; } @keyframes circle { 0%{ opacity: 0.05; } 100%{ opacity: 0.9; } }
2018-12-09小程序 | 在首页判断是否登录并跳转到登陆界面login //index.js import { config } from '../../config.js' Page({ /** * 页面的初始数据 */ data: { //判断小程序的AP
2019-07-22小程序判断是否包含某个字符(数组和字符串)console.log(['x', 'a'].indexOf('a')); // 1 console.log('dbac'.indexOf('aa')); // -1
2018-12-09小程序 | 在首页判断是否登录并登陆执行index.wxml //其他业务 我知道了 index.js import { config } from '../../config.js' // pages/index/index.js Pag
2018-10-07小程序组件 | mask遮罩层组件定义组件 wxml: wxss .container{ background-color: #000; position: fixed; top: 0; opacity: 0.6; width: 10
2018-12-09微信小程序 form表单input变化时自动搜索index.wxml 搜索 取消 index.js inputTyping: function (e) { var title = e.detail.value; console.log(e) //
2018-12-09小程序 | 小程序中使用关注公众号功能实现在小程序中显示公众号,点击后进行关注 使用组件 使用说明 使用组件前,需前往小程序后台,在“设置”->“接口设置”->“公众号关注组件”中设置要展示的公众号。 注:设置的公众号需与小程序主体一致。