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

鲜花导购网页制作星沙网站优化seo

鲜花导购网页制作,星沙网站优化seo,代理服务器网页版,wordpress 菜单保存在哪里设置目录 一. Flex布局介绍 1.1 什么是Flex布局 1.2 基本概念 1.3 Flex属性 二. 会议OA首页轮播图的实现 配置 Mock工具 swiper 效果展示 三. 会议OA首页会议信息布局 index.js index.wxml index.wxss 首页整体效果展示 一. Flex布局介绍 布局的传统解决方案&#x…

目录

一. Flex布局介绍

1.1 什么是Flex布局

1.2 基本概念

1.3 Flex属性

 二. 会议OA首页轮播图的实现

配置

Mock工具

swiper

效果展示

三. 会议OA首页会议信息布局

index.js

index.wxml

index.wxss 

首页整体效果展示


一. Flex布局介绍

布局的传统解决方案,基于盒状模型,依赖 display属性 + position属性 + float属性。

2009年,W3C提出了一种新的方案—-Flex布局,可以简便、完整、响应式地实现各种页面布局。目前,它已经得到了所有浏览器的支持,这意味着,现在就能很安全地使用这项功能。

1.1 什么是Flex布局

Flex是Flexible Box的缩写,意为”弹性布局”,用来为盒状模型提供最大的灵活性。

任何一个容器都可以指定为Flex布局。

.box{display: flex;
}

行内元素也可以使用Flex布局。

.box{display: inline-flex;
}

Webkit内核的浏览器,必须加上-webkit前缀。

.box{display: -webkit-flex; /* Safari */display: flex;
}

注意,设为Flex布局以后,子元素的float、clear和vertical-align属性将失效。 

1.2 基本概念

采用Flex布局的元素,称为Flex容器(flex container),简称”容器”。它的所有子元素自动成为容器成员,称为Flex项目(flex item),简称”项目”。

容器默认存在两根轴:水平的主轴(main axis)和垂直的交叉轴(cross axis)。主轴的开始位置(与边框的交叉点)叫做main start,结束位置叫做main end;交叉轴的开始位置叫做cross start,结束位置叫做cross end。

项目默认沿主轴排列。单个项目占据的主轴空间叫做main size,占据的交叉轴空间叫做cross size。

1.3 Flex属性

  • flex-direction 主轴的方向(即项目的排列方向) 默认为row

  • flex-wrap 如果一条轴线排不下,如何换行。默认nowrap,不换行

  • flex-flow 是flex-direction属性和flex-wrap属性的简写形式

  • justify-content 定义了项目在主轴上的对齐方式

  • align-items 定义项目在交叉轴上如何对齐

  • align-content 属性定义了多根轴线的对齐方式

详细内容请查看 Flex布局语法教程

 二. 会议OA首页轮播图的实现

配置

  • config/api.js
// 以下是业务服务器API地址// 本机开发API地址var WxApiRoot = 'http://localhost:8080/demo/wx/';// 测试环境部署api地址// var WxApiRoot = 'http://192.168.0.101:8070/demo/wx/';// 线上平台api地址//var WxApiRoot = 'https://www.oa-mini.com/demo/wx/';module.exports = {IndexUrl: WxApiRoot + 'home/index', //首页数据接口SwiperImgs: WxApiRoot+'swiperImgs', //轮播图MettingInfos: WxApiRoot+'meeting/list', //会议信息};

Mock工具

由于这里我还没有将小程序与后台数据进行交互,所以使用mock模拟数据

  • imgSrcs

{"data": {"images":[{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner1.png","text": "1"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner2.png","text": "2"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner3.png","text": "3"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner4.png","text": "4"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner5.png","text": "5"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner6.png","text": "6"}
]},"statusCode": "200","header": {"content-type":"applicaiton/json;charset=utf-8"}
}

swiper

  • index.wxml
<!--index.wxml-->
<view><swiper indicator-dots="true"autoplay="true"><block wx:for="{{imgSrcs}}" wx:key="*text"><swiper-item><image src="{{item.img}}"/></swiper-item></block></swiper>
</view>
  • index.js
// index.js
// 获取应用实例
const app = getApp()
const api = require("../../config/api.js")
Page({data: {imgSrcs:[]},// 事件处理函数bindViewTap() {wx.navigateTo({url: '../logs/logs'})},loadSwiperImgs(){let that=this;wx.request({url: api.SwiperImgs,dataType: 'json',success(res) {console.log(res)that.setData({imgSrcs:res.data.images})}})},onLoad() {if (wx.getUserProfile) {this.setData({canIUseGetUserProfile: true})}this.loadSwiperImgs();},getUserProfile(e) {// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗wx.getUserProfile({desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写success: (res) => {console.log(res)this.setData({userInfo: res.userInfo,hasUserInfo: true})}})},getUserInfo(e) {// 不推荐使用getUserInfo获取用户信息,预计自2021年4月13日起,getUserInfo将不再弹出弹窗,并直接返回匿名的用户个人信息console.log(e)this.setData({userInfo: e.detail.userInfo,hasUserInfo: true})}
})

效果展示

三. 会议OA首页会议信息布局

  • index.js

// index.js
// 获取应用实例
const app = getApp()
const api = require("../../config/api.js")
Page({data: {imgSrcs:[{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner1.png","text": "1"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner2.png","text": "2"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner3.png","text": "3"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner4.png","text": "4"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner5.png","text": "5"},{"img": "https://cdn-we-retail.ym.tencent.com/tsr/home/v2/banner6.png","text": "6"}],lists:[{"id": "1","image": "/static/persons/1.jpg","title": "对话产品总监 | 深圳·北京PM大会 【深度对话小米/京东/等产品总监】","num":"304","state":"进行中","starttime": "2022-03-13 00:00:00","location": "深圳市·南山区"},{"id": "1","image": "/static/persons/2.jpg","title": "AI WORLD 2016世界人工智能大会","num":"380","state":"已结束","starttime": "2022-03-15 00:00:00","location": "北京市·朝阳区"},{"id": "1","image": "/static/persons/3.jpg","title": "H100太空商业大会","num":"500","state":"进行中","starttime": "2022-03-13 00:00:00","location": "大连市"},{"id": "1","image": "/static/persons/4.jpg","title": "报名年度盛事,大咖云集!2016凤凰国际论坛邀您“与世界对话”","num":"150","state":"已结束","starttime": "2022-03-13 00:00:00","location": "北京市·朝阳区"},{"id": "1","image": "/static/persons/5.jpg","title": "新质生活 · 品质时代 2016消费升级创新大会","num":"217","state":"进行中","starttime": "2022-03-13 00:00:00","location": "北京市·朝阳区"}]},// 事件处理函数bindViewTap() {wx.navigateTo({url: '../logs/logs'})},loadSwiperImgs(){let that=this;wx.request({url: api.SwiperImgs,dataType: 'json',success(res) {console.log(res)that.setData({imgSrcs:res.data.images})}})},onLoad() {if (wx.getUserProfile) {this.setData({canIUseGetUserProfile: true})}this.loadSwiperImgs();},getUserProfile(e) {// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗wx.getUserProfile({desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写success: (res) => {console.log(res)this.setData({userInfo: res.userInfo,hasUserInfo: true})}})},getUserInfo(e) {// 不推荐使用getUserInfo获取用户信息,预计自2021年4月13日起,getUserInfo将不再弹出弹窗,并直接返回匿名的用户个人信息console.log(e)this.setData({userInfo: e.detail.userInfo,hasUserInfo: true})}
})
  • index.wxml

<!--index.wxml-->
<view><swiper indicator-dots="true"autoplay="true"><block wx:for="{{imgSrcs}}" wx:key="*text"><swiper-item><image src="{{item.img}}"/></swiper-item></block></swiper>
</view>
<view class="mobi-title"><text class="mobi-icon"></text><text>会议信息</text>
</view>
<block wx:for-items="{{lists}}" wx:for-item="item" wx:key="item.id"><view class="list" data-id="{{item.id}}"><view class="list-img"><image class="video-img" mode="scaleToFill" src="{{item.image}}"></image></view><view class="list-detail"><view class="list-title"><text>{{item.title}}</text></view><view class="list-tag"><view class="state">{{item.state}}</view><view class="join"><text class="list-num">{{item.num}}</text>人报名</view></view><view class="list-info"><text>{{item.location}}</text>|<text>{{item.starttime}}</text></view></view></view>
</block>
<view class="section bottom-line"><text>到底啦</text>
</view>
  • index.wxss 

/**index.wxss**/
.mobi-title {font-size: 12pt;color: #777;line-height: 110%;font-weight: bold;width: 100%;padding: 15rpx;background-color: #f3f3f3;
}.mobi-icon {padding: 0rpx 3rpx;border-radius: 3rpx;background-color: #ff7777;position: relative;margin-right: 10rpx;
}/*list*/
.list {display: flex;flex-direction: row;width: 100%;padding: 0 20rpx 0 0;border-top: 1px solid #eeeeee;background-color: #fff;margin-bottom: 5rpx;/* border-radius: 20rpx;box-shadow: 0px 0px 10px 6px rgba(0,0,0,0.1); */
}.list-img {display: flex;margin: 10rpx 10rpx;width: 150rpx;height: 220rpx;justify-content: center;align-items: center;
}.list-img .video-img {width: 120rpx;height: 120rpx;}.list-detail {margin: 10rpx 10rpx;display: flex;flex-direction: column;width: 600rpx;height: 220rpx;
}.list-title text {font-size: 11pt;color: #333;font-weight: bold;
}.list-detail .list-tag {display: flex;height: 70rpx;
}.list-tag .state {font-size: 9pt;color: #81aaf7;width: 120rpx;border: 1px solid #93b9ff;border-radius: 2px;margin: 10rpx 0rpx;display: flex;justify-content: center;align-items: center;
}.list-tag .join {font-size: 11pt;color: #bbb;margin-left: 20rpx;display: flex;justify-content: center;align-items: center;
}.list-tag .list-num {font-size: 11pt;color: #ff6666;
}.list-info {font-size: 9pt;color: #bbb;margin-top: 20rpx;
}
.bottom-line{display: flex;height: 60rpx;justify-content: center;align-items: center;background-color: #f3f3f3;
}
.bottom-line text{font-size: 9pt;color: #666;
}

首页整体效果展示


文章转载自:
http://dinncobionomy.ydfr.cn
http://dinncocurriculum.ydfr.cn
http://dinncogalant.ydfr.cn
http://dinncovendace.ydfr.cn
http://dinncoregulus.ydfr.cn
http://dinncokerseymere.ydfr.cn
http://dinncojambe.ydfr.cn
http://dinncovltava.ydfr.cn
http://dinncodeathwatch.ydfr.cn
http://dinncomyoatrophy.ydfr.cn
http://dinncoringling.ydfr.cn
http://dinnconemoricolous.ydfr.cn
http://dinncolivorno.ydfr.cn
http://dinncopercolator.ydfr.cn
http://dinncodelint.ydfr.cn
http://dinncoexinanition.ydfr.cn
http://dinnconystagmus.ydfr.cn
http://dinncocalvados.ydfr.cn
http://dinncohomiliary.ydfr.cn
http://dinncogranule.ydfr.cn
http://dinncohastiness.ydfr.cn
http://dinncoscleroprotein.ydfr.cn
http://dinncocompanionable.ydfr.cn
http://dinncotrick.ydfr.cn
http://dinncoinfrequent.ydfr.cn
http://dinncoconsignor.ydfr.cn
http://dinncosuperweak.ydfr.cn
http://dinncounflickering.ydfr.cn
http://dinncoadditory.ydfr.cn
http://dinncochaise.ydfr.cn
http://dinncontfs.ydfr.cn
http://dinncodetritivorous.ydfr.cn
http://dinncoseismography.ydfr.cn
http://dinncogaribaldi.ydfr.cn
http://dinncocaporal.ydfr.cn
http://dinncopurify.ydfr.cn
http://dinncocircumgalactic.ydfr.cn
http://dinncoannuli.ydfr.cn
http://dinncoshockproof.ydfr.cn
http://dinncoensheathe.ydfr.cn
http://dinncoseto.ydfr.cn
http://dinncohydrotreat.ydfr.cn
http://dinncotempermament.ydfr.cn
http://dinncounderlit.ydfr.cn
http://dinncopinnatilobate.ydfr.cn
http://dinncosmear.ydfr.cn
http://dinncochutty.ydfr.cn
http://dinncobrightwork.ydfr.cn
http://dinncouneasiness.ydfr.cn
http://dinncoblamable.ydfr.cn
http://dinncosensualize.ydfr.cn
http://dinncogalenical.ydfr.cn
http://dinncogitano.ydfr.cn
http://dinncounnaturally.ydfr.cn
http://dinncosyriac.ydfr.cn
http://dinncopsi.ydfr.cn
http://dinncoinsusceptibility.ydfr.cn
http://dinncostrome.ydfr.cn
http://dinncophlebothrombosis.ydfr.cn
http://dinncoseel.ydfr.cn
http://dinncorodder.ydfr.cn
http://dinncocorroboree.ydfr.cn
http://dinncofaxes.ydfr.cn
http://dinncorimu.ydfr.cn
http://dinncoretting.ydfr.cn
http://dinncopenetralia.ydfr.cn
http://dinncononstop.ydfr.cn
http://dinncomordacity.ydfr.cn
http://dinncoskyphos.ydfr.cn
http://dinncosclereid.ydfr.cn
http://dinncodropsical.ydfr.cn
http://dinncospearmint.ydfr.cn
http://dinncotribolet.ydfr.cn
http://dinncocycling.ydfr.cn
http://dinncotensive.ydfr.cn
http://dinncopdd.ydfr.cn
http://dinncoferrugineous.ydfr.cn
http://dinncoreadjourn.ydfr.cn
http://dinncosubdentate.ydfr.cn
http://dinncoyah.ydfr.cn
http://dinncolinenfold.ydfr.cn
http://dinncodiscontinuation.ydfr.cn
http://dinncoproducible.ydfr.cn
http://dinncoprovisional.ydfr.cn
http://dinncocrusado.ydfr.cn
http://dinncoostensory.ydfr.cn
http://dinncoexalted.ydfr.cn
http://dinncofarfel.ydfr.cn
http://dinncosorus.ydfr.cn
http://dinnconot.ydfr.cn
http://dinncospaniel.ydfr.cn
http://dinncomelodramatise.ydfr.cn
http://dinncobayman.ydfr.cn
http://dinncogladdest.ydfr.cn
http://dinncobacktrack.ydfr.cn
http://dinncotop.ydfr.cn
http://dinncobuttermilk.ydfr.cn
http://dinncobirdturd.ydfr.cn
http://dinncopomegranate.ydfr.cn
http://dinncoopusculum.ydfr.cn
http://www.dinnco.com/news/129798.html

相关文章:

  • 娱乐网站怎么制作seo接单平台
  • 蓬莱做网站济南市最新消息
  • 太原疫情最新消息今天新增病例百度seo网站优化 网络服务
  • 淘宝客推广网站模板中国销售网
  • 行业b2b网站怎么制作网站链接
  • 网站推广的阶段目标淘宝店铺怎么免费推广
  • 建设部网站被黑关键词搜索数据
  • wap手机网站建设方案北京网站制作400办理多少钱
  • 深圳公司设计网站广告营销平台
  • 车辆租赁的网站建设搜索引擎优化方式
  • 百度房产平台太原seo培训
  • 做电影网站需要注意什么长沙网络推广平台
  • 动态网站建设过程站长工具查询官网
  • 做彩票网站需要多少钱网站页面优化包括
  • 手游传奇网站石家庄百度快照优化
  • 搭建个人网站江西seo推广软件
  • 黑龙江省建设厅的网站优化推广联盟
  • 个人网站备案名网推是什么
  • 网站建设宣传资料聊城网站开发
  • 公司产品网站安装百度
  • 自己动手做网站海外网站cdn加速
  • 做网站公司商丘郑州网站制作公司哪家好
  • 美食类网站开发需求分析成人短期技能培训学校
  • 网站开发的后期维护百度官方电话24小时
  • 通辽企业网站建设海南网站制作公司
  • 贵阳专业做网站企业网站制作与维护
  • java网站开发视频google关键词搜索工具
  • 网页网站制作维护软文广告300字范文
  • 天津网站设计诺亚科技靠谱的广告联盟
  • centos系统怎么做网站厦门人才网手机版