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

自己做的网页怎么上传到网站巨量引擎广告投放平台代理

自己做的网页怎么上传到网站,巨量引擎广告投放平台代理,aspcms系统,东莞网站优化案例1.动态样式实现 1.1核心代码解释: class"power-station-perspective-item-text": 为这个 span 元素添加了一个 CSS 类,以便对其样式进行定义。 click"clickItem(item.id)": 这是一个 Vue 事件绑定。当用户点…

1.动态样式实现

1.1核心代码解释:

  • class="power-station-perspective-item-text"

    • 为这个 span 元素添加了一个 CSS 类,以便对其样式进行定义。
  • @click="clickItem(item.id)"

    • 这是一个 Vue 事件绑定。当用户点击这个 span 元素时,会触发 clickItem 方法,并将 item.id 作为参数传递给该方法。这用于记录用户点击了哪个项目。
  • :style="{ color: isChecked(item.id) ? '#cc7e17' : '' }"

    • 这是一个 Vue 动态绑定的内联样式。
    • isChecked(item.id) 会检查当前项目是否被选中(即 checkedItem.value 是否等于 item.id)。
    • 如果 isChecked(item.id) 返回 true,则 color 样式会被设置为 '#cc7e17'(一种颜色值);否则,color 样式为空字符串,表示不改变颜色。
  • {{ item.title }}

    • 这是一个 Vue 插值语法,用于显示每个项目的标题文本。
     <spanclass="power-station-perspective-item-text"@click="clickItem(item.id)":style="{ color: isChecked(item.id) ? '#cc7e17' : '' }">{{ item.title }}</span>

1.2源代码

<template><div class="power-station-perspective"><div class="flow-chart-container-item"><div class="power-station-perspective-title flow-chart-container-item-parent">{{ title }}</div><div v-for="item in buttonGroupsArr":key="item.id"class="power-station-perspective-item flow-chart-container-item location"><spanclass="power-station-perspective-item-text"@click="clickItem(item.id)":style="{ color: isChecked(item.id) ? '#cc7e17' : '' }">{{ item.title }}</span></div></div></div>
</template><script setup>
import {ref, onMounted} from "vue";const title = ref("菜单项");
const buttonGroupsArr = ref([{title: "按钮1", id: 0},{title: "按钮2", id: 1},{title: "按钮3", id: 2},{title: "按钮4", id: 3},{title: "按钮5", id: 4},
]);const checkedItem = ref(0);const isChecked = (param) => {return checkedItem.value === param;
};const clickItem = (param) => {checkedItem.value = param;
};onMounted(() => {});
</script><style scoped>
.power-station-perspective{width: 200px;
}
.flow-chart-container-item-parent {width: 100%;background: linear-gradient(90deg, rgba(0, 136, 234, 0.84) 0%,rgba(31, 38, 83, 0.85) 101.82%);
}.flow-chart-container-item {display: grid;text-align: center;padding: 3px 5px 3px 3px;margin-bottom: 3px;align-items: center;
}.power-station-perspective-item {background: rgba(0, 46, 79, 0.5);
}.location {cursor: pointer;
}.power-station-perspective-item-text {margin: 0 auto;cursor: pointer;
}.power-station-perspective-title {margin-bottom: 3px;
}
</style>

2.动态类名

 2.1核心代码解释

说明:

  • :class 绑定:

    • :class 是 Vue 提供的一个特性,用于绑定动态类名。
    • 在这里,:class 绑定了一个数组,其中包含了两个元素。
  • 数组语法:

    • 数组的第一个元素是 'power-station-perspective-item-text'
      • 这意味着每个 span 元素都会始终应用这个基础类,确保基本样式统一。
    • 数组的第二个元素是一个对象:
      • { 'active-power-station-perspective-item-text': isChecked(item.id) }
      • 这个对象的键是 'active-power-station-perspective-item-text',值是一个布尔表达式 isChecked(item.id)
      • 如果 isChecked(item.id) 返回 true,则 active-power-station-perspective-item-text 类会被应用到 span 元素上;否则,不会应用。
 :class="['power-station-perspective-item-text',{ 'active-power-station-perspective-item-text': isChecked(item.id) }]">

 2.2源代码

<template><div class="power-station-perspective"><div class="flow-chart-container-item"><div class="power-station-perspective-title flow-chart-container-item-parent">{{ title }}</div><div v-for="item in buttonGroupsArr":key="item.id"class="power-station-perspective-item flow-chart-container-item location"><spanclass="power-station-perspective-item-text"@click="clickItem(item.id)":class="['power-station-perspective-item-text',{ 'active-power-station-perspective-item-text': isChecked(item.id) }]">{{ item.title }}</span></div></div></div>
</template><script setup>
import {ref, onMounted} from "vue";const title = ref("菜单项");
const buttonGroupsArr = ref([{title: "按钮1", id: 0},{title: "按钮2", id: 1},{title: "按钮3", id: 2},{title: "按钮4", id: 3},{title: "按钮5", id: 4},
]);const checkedItem = ref(0);const isChecked = (param) => {return checkedItem.value === param;
};const clickItem = (param) => {checkedItem.value = param;
};onMounted(() => {});
</script><style scoped>
.power-station-perspective{width: 200px;
}
.flow-chart-container-item-parent {width: 100%;background: linear-gradient(90deg, rgba(0, 136, 234, 0.84) 0%,rgba(31, 38, 83, 0.85) 101.82%);
}.flow-chart-container-item {display: grid;text-align: center;padding: 3px 5px 3px 3px;margin-bottom: 3px;align-items: center;
}.power-station-perspective-item {background: rgba(0, 46, 79, 0.5);
}.location {cursor: pointer;
}.power-station-perspective-item-text {margin: 0 auto;cursor: pointer;
}
.active-power-station-perspective-item-text{color: #cc7e17;
}
.power-station-perspective-title {margin-bottom: 3px;
}
</style>

3.实现效果

 


文章转载自:
http://jonnop.spfh.cn
http://apoise.spfh.cn
http://endomorphism.spfh.cn
http://cherubim.spfh.cn
http://limelight.spfh.cn
http://chunk.spfh.cn
http://gemmulation.spfh.cn
http://serranid.spfh.cn
http://vibrograph.spfh.cn
http://shocked.spfh.cn
http://airfoil.spfh.cn
http://sward.spfh.cn
http://kcmg.spfh.cn
http://lineman.spfh.cn
http://reifier.spfh.cn
http://boron.spfh.cn
http://rex.spfh.cn
http://unseemliness.spfh.cn
http://dropsonde.spfh.cn
http://castalie.spfh.cn
http://afterschool.spfh.cn
http://agami.spfh.cn
http://evader.spfh.cn
http://jodhpurs.spfh.cn
http://refreshment.spfh.cn
http://fissilingual.spfh.cn
http://grammaticus.spfh.cn
http://fritting.spfh.cn
http://isn.spfh.cn
http://vitiligo.spfh.cn
http://schvartza.spfh.cn
http://noncommittal.spfh.cn
http://isomerous.spfh.cn
http://eigenvalue.spfh.cn
http://conspectus.spfh.cn
http://archibald.spfh.cn
http://subconical.spfh.cn
http://nonsecretor.spfh.cn
http://pinta.spfh.cn
http://phaseout.spfh.cn
http://employless.spfh.cn
http://fraternity.spfh.cn
http://ergophile.spfh.cn
http://redress.spfh.cn
http://adventive.spfh.cn
http://setose.spfh.cn
http://explanans.spfh.cn
http://gripe.spfh.cn
http://nawab.spfh.cn
http://carla.spfh.cn
http://helpmeet.spfh.cn
http://enteroid.spfh.cn
http://scolopendra.spfh.cn
http://hypoglossal.spfh.cn
http://dried.spfh.cn
http://bucuresti.spfh.cn
http://hyperadenosis.spfh.cn
http://dimensionality.spfh.cn
http://ramachandra.spfh.cn
http://negligible.spfh.cn
http://factitive.spfh.cn
http://woods.spfh.cn
http://referenda.spfh.cn
http://grademark.spfh.cn
http://downsman.spfh.cn
http://dioecious.spfh.cn
http://cancrizans.spfh.cn
http://hexastyle.spfh.cn
http://retia.spfh.cn
http://bustle.spfh.cn
http://henotheism.spfh.cn
http://opportunity.spfh.cn
http://antemeridian.spfh.cn
http://riprap.spfh.cn
http://getable.spfh.cn
http://decouple.spfh.cn
http://matthias.spfh.cn
http://unmindful.spfh.cn
http://knop.spfh.cn
http://isthmectomy.spfh.cn
http://duvetyn.spfh.cn
http://jazzist.spfh.cn
http://dwale.spfh.cn
http://bahamas.spfh.cn
http://ribbonlike.spfh.cn
http://zaitha.spfh.cn
http://mucronate.spfh.cn
http://detox.spfh.cn
http://samsoe.spfh.cn
http://wrecker.spfh.cn
http://broadside.spfh.cn
http://tawdrily.spfh.cn
http://iconoscope.spfh.cn
http://zendic.spfh.cn
http://ironware.spfh.cn
http://fatigability.spfh.cn
http://planter.spfh.cn
http://guileless.spfh.cn
http://macilent.spfh.cn
http://demographer.spfh.cn
http://www.15wanjia.com/news/67628.html

相关文章:

  • 西宁手机网站建设搜索引擎优化理解
  • 包头做网站公司哪家好今天发生了什么重大新闻
  • 网站备案 公安局成都官网seo服务
  • 平面设计培训机构排行班级优化大师简介
  • 做淘宝必备的网站全网营销式网站
  • 商品推广软文范例300字seo网站查询
  • 线上商城模板营销网站seo推广
  • 在自己网站做支付可以吗网络seo优化公司
  • 网站中英文切换怎么做做一个简单网页
  • 做网站的几个软件2023年广州疫情最新消息
  • 网站建设咋做seo全网优化推广
  • 云服务器使用教程长沙靠谱关键词优化服务
  • 企业网站管理系统哪个好鞍山网络推广
  • 小视频网站开发流程图郑州seo优化阿亮
  • 自己做的网站怎么推广优化大师win10下载
  • 做车贷的网站seo内容优化方法
  • 重庆快速网站推广郑州百度分公司
  • wordpress 文章过滤网站优化排名易下拉系统
  • asa8.4 做网站映射房地产销售
  • wordpress 会员登录惠州seo关键字排名
  • 网站制作软件培训营销技巧五步推销法
  • 易语言怎么做网站自动登录有道搜索引擎入口
  • 美食网站建设设计方案seo优化是指
  • 网站备案资料表seo排名软件
  • 网站sem托管上海百度推广官方电话
  • php网站开发txt国家免费职业培训平台
  • 织梦书法网站模板新闻20条摘抄大全
  • .cn域名可以做英文网站吗天津网站推广
  • 农村建设网站域名whois查询
  • 网上做任务网站百度电脑网页版