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

100个最全的免费网站河池网站seo

100个最全的免费网站,河池网站seo,外贸网站建设 东莞,网站开发环境的意义实现5*5正方形网格x轴和y轴显示对应数值组件封装 需求&#xff1a;按5*5的正方形网格&#xff0c;根据目标数据的x和y轴值显示对应的文字&#xff0c;实现效果图如下&#xff1a;&#xff08;当前目标数值&#xff1a;x2&#xff0c;y2&#xff09; 代码如下&#xff1a; <…

实现5*5正方形网格x轴和y轴显示对应数值组件封装

需求:按5*5的正方形网格,根据目标数据的x和y轴值显示对应的文字,实现效果图如下:(当前目标数值:x=2,y=2)

在这里插入图片描述

代码如下:

<template><div class="box"><div class="box-item" v-for="(item, index) in itemList" :key="index" :class="item.className">{{ (x === item.x && y === item.y) ? item.label : '' }}</div></div>
</template><script setup lang="ts">
withDefaults(defineProps<{x?: number,y?: number
}>(), {x: 2,y: 2
})interface itemType {className: string;label: string;x: number;y: number;
}
let itemList: itemType[] = Array.from({ length: 25 }).map((_, index) => {let result = {className: '',label: '中',x: 0,y: 0}if ([3, 4, 8, 9, 14].includes(index)) {result.className = 'blue'result.label = '高'} else if ([10, 15, 16, 20, 21].includes(index)) {result.className = 'orange'result.label = '低'}result.className += ` xy-${index}`return result
})
let Y = 10
for (let j = 0; j < 25; j += 5) {for (let i = j; i < j + 5; i++) {if ([0, 5, 10, 15, 20].includes(i)) {itemList[i].x = 2} else {itemList[i].x = itemList[i - 1].x + 2}itemList[i].y = Y}Y -= 2
}
</script><style lang="scss" scoped>
.box {width: 270px;display: flex;flex-wrap: wrap;position: absolute;&::after {content: 'x轴';position: absolute;bottom: -20px;right: -10px;}&::before {content: 'y轴';position: absolute;top: -10px;left: -20px;// transform: rotate(-90deg);writing-mode:vertical-lr;}
}.box-item {width: 20%;height: 50px;border: 1px solid #ff0000;box-sizing: border-box;font-size: 16px;display: flex;align-items: center;justify-content: center;position: relative;&.xy-0::after {content: '10';position: absolute;left: -20px;}&.xy-5::after {content: '8';position: absolute;left: -20px;}&.xy-10::after {content: '6';position: absolute;left: -20px;}&.xy-15::after {content: '4';position: absolute;left: -20px;}&.xy-20::after {content: '2';position: absolute;left: -20px;}&.xy-20::before {content: '2';position: absolute;bottom: -20px;}&.xy-21::before {content: '4';position: absolute;bottom: -20px;}&.xy-22::before {content: '6';position: absolute;bottom: -20px;}&.xy-23::before {content: '8';position: absolute;bottom: -20px;}&.xy-24::before {content: '10';position: absolute;bottom: -20px;}
}.blue {background-color: skyblue;
}.orange {background-color: orange;
}
</style>
http://www.zhongyajixie.com/news/54780.html

相关文章:

  • 现代化专业群建设专题网站护理专业seo排名赚靠谱吗
  • 给自己的爱人做网站宁波关键词网站排名
  • 网站模板预览与编辑器东莞做网站公司
  • 优惠卷网站怎么做推广seo技术公司
  • 做一个这样的网站应该报价多少手机端竞价恶意点击能防止吗
  • 露天做愛偷拍网站搜索seo优化
  • 展厅网站seo软件资源
  • 网站如何做秒杀活动不受国内限制的浏览器下载
  • 个旧建设局信息公开门户网站朝阳seo建站
  • 沈阳唐朝网站建设建立网站的详细步骤
  • 学院网站建设管理制度重庆seo排
  • 网站的费用可以做无形资产吗免费推广网站排名
  • vps 需刷新几次才能打开网站网络营销的功能有哪些?
  • 辽宁建设工程造价管理网站活动营销推广方案
  • 深圳市建网站公司宁波如何做抖音seo搜索优化
  • 网站后台管理系统框架重庆网络seo公司
  • 电商网站模板素材2022拉人头最暴利的app
  • 可视化网页编辑工具seo上首页
  • 2018年怎么做网站排名专业推广图片
  • 做模拟人生比较有名的网站合肥网站优化推广方案
  • 龙华做棋牌网站建设找哪家效益快南宁百度推广代理公司
  • 国内外做的比较好的家装网站吉安seo
  • 公司网站推广费用推广优化
  • 长沙模板建站免费网站建设seo
  • 大连网络公司哪家好宁波seo网络推广咨询热线
  • 网站建设模板源代码网络营销促销策略有哪些
  • 怎样做网站地图商丘搜索引擎优化
  • 公司网站怎么做能被别人搜索到广州各区进一步强化
  • 做网站如何避免商标侵权郑州百度推广公司电话
  • 在vs做的项目怎么连接到网站今日热点新闻