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

用模板做企业网站杭州网站seo价格

用模板做企业网站,杭州网站seo价格,wordpress设置首页关键词,莱芜今日信息要实现能转起来连接,其实就是要展示的数据复制一份,下半部分的⚪隐藏即可通过getItemPosition计算每个元素在圆上的位置让大转盘进行旋转,为了里面的元素是正向展示的,则同时每个元素进行反方向同角度进行旋转由于UI图是椭圆的&am…

在这里插入图片描述

  1. 要实现能转起来连接,其实就是要展示的数据复制一份,下半部分的⚪隐藏即可
  2. 通过getItemPosition计算每个元素在圆上的位置
  3. 让大转盘进行旋转,为了里面的元素是正向展示的,则同时每个元素进行反方向同角度进行旋转
  4. 由于UI图是椭圆的,则Y轴进行压缩transform: scaleY(0.7);,每个子元素为了正常展示scaleY(1.42)
  5. 按照需求可添加鼠标移动进入是否暂停动画handleAnimation
<template><div class="circular-menu"><!-- 中心按钮 --><div class="center-button" @click="handleCenterClick"><button class="default-center-btn">加入我们</button></div><div class="circular-menu-container" @mouseenter="loopClose()" @mouseleave="loopStart()"><!-- 主容器 --><div class="circular-wheel" ref="wheel" @mouseenter="pauseRotation" @mouseleave="resumeRotation"><!-- 旋转的中心圆盘 --><div ref="whellOrigin" class="wheel-origin"><!-- 每个菜单项 --><div v-for="(item, index) in menuItems" :key="index" class="wheel-item":class="{ 'active': activeIndex === index }" :style="getItemPosition(index)"@click="handleItemClick(index)"><img :src="getIconPath(item.icon)" :alt="item.title" class="item-icon" /><p class="item-title">{{ item.title }}</p></div></div></div></div></div></template><script>
export default {name: 'CircularMenu',props: {items: {type: Array,default: () => [{ title: "XXX", icon: "h" },{ title: "XXX", icon: "hv" },{ title: "XXX", icon: "hk" },{ title: "XXX", icon: "net" },{ title: "XXX", icon: "hua" },{ title: "XXX", icon: "shu" },{ title: "XXX", icon: "m" },{ title: "XXX", icon: "ev" },{ title: "XXX", icon: "rjgf" },{ title: "XXX", icon: "sr" },//重复{ title: "XXX", icon: "h" },{ title: "XXX", icon: "hv" },{ title: "XXX", icon: "hk" },{ title: "XXX", icon: "net" },{ title: "XXX", icon: "hua" },{ title: "XXX", icon: "shu" },{ title: "XXX", icon: "m" },{ title: "XXX", icon: "ev" },{ title: "XXX", icon: "rjgf" },{ title: "XXX", icon: "sr" },]},startAngle: {type: Number,default: 0 // 起始角度}},data() {return {currentRotation: this.startAngle,activeIndex: 0,radius: 0,isPaused: false,animationFrame: null}},computed: {menuItems() {return this.items}},mounted() {this.initWheel()//   this.startAutoRotation()window.addEventListener('resize', this.handleResize)},beforeDestroy() {cancelAnimationFrame(this.animationFrame)window.removeEventListener('resize', this.handleResize)},methods: {initWheel() {this.$nextTick(() => {const wheel = this.$refs.wheelthis.radius = wheel ? wheel.offsetWidth / 2 : 0})},loopClose() {this.handleAnimation("paused");},// 鼠标移出loopStart() {this.handleAnimation("running");},// 动画暂停 / 启动handleAnimation(params) {this.$refs.whellOrigin.style.animationPlayState = params;let cirulaItem = document.querySelectorAll(".wheel-item");for (let i = 0; i < cirulaItem.length; i++) {cirulaItem[i].style.animationPlayState = params;}},getItemPosition(index) {const angle = (index * (360 / this.menuItems.length)) - 90 // -90度从顶部开始const rad = (angle * Math.PI) / 180const distance = this.radius * 0.85 // 85%半径距离return {left: `${this.radius + distance * Math.cos(rad)}px`,top: `${this.radius + distance * Math.sin(rad)}px`,}},getIconPath(icon) {return require(`@/assets/images/ui-demo/portal/custom/${icon}.png`)},pauseRotation() {this.isPaused = true},resumeRotation() {this.isPaused = false},handleItemClick(index) {this.activeIndex = indexthis.$emit('item-click', this.menuItems[index])},handleCenterClick() {this.$emit('center-click')},handleResize() {this.initWheel()}}
}
</script><style lang="scss" scoped>
.circular-menu {aspect-ratio: 2 / 1;position: relative;width: 100vw;max-width: 80vw;overflow: hidden;margin: auto;margin-top: calc(-0.3 * 40vw);background: url(~@/assets/images/ui-demo/portal/custom-bg.png) center bottom /100% auto no-repeat;&::after {display: inline-block;width: 100%;height: 30%;background: linear-gradient(0, rgba(244, 246, 250, 1) 0%, rgba(244, 246, 250, 0) 100%);content: ' ';position: absolute;bottom: -4px;z-index: 10;max-height:  265px;}.center-button {z-index: 13;position: absolute;left: 50%;transform: translate(-50%, 0%);bottom: 108px;width: 120px;height: 48px;background: linear-gradient(135deg, #1364DF, #0396FF);font-size: 18px;cursor: pointer;box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);transition: transform 0.3s ease;overflow: hidden;&::before {content: "";width: 100%;height: 100%;background: #1364DF;top: 0;left: -100%;position: absolute;transition: all 0.6s cubic-bezier(0.32, 0.94, 0.6, 1);}&:hover {&::before {left: 0;}}.default-center-btn {background: transparent;border: none;color: white;font-size: 18px;font-weight: bold;cursor: pointer;z-index: 10;line-height: 48px;width: 100%;text-align: center;position: relative;}}}.circular-menu-container {position: relative;width: 100vw;max-width: 80vw;margin: 0 auto;aspect-ratio: 1;transform: scaleY(0.7);.circular-wheel {position: relative;width: 100%;height: 100%;border-radius: 50%;overflow: hidden;.wheel-origin {position: absolute;width: 100%;height: 100%;transform-origin: center;animation: rotate 45s infinite linear;.wheel-item {position: absolute;animation: rotate2 45s infinite linear;width: 80px;height: 80px;margin-left: -40px;margin-top: -40px;display: flex;flex-direction: column;align-items: center;justify-content: center;cursor: pointer;transition: all 0.3s ease;transform-origin: center;&:hover,&.active {transform: scale(1.1) rotate(v-bind('currentRotation * -1deg'));.item-title {color: #176AFD;font-weight: bold;}}.item-icon {width: 160px;height: 80px;border-radius: 4px;margin-bottom: 6px;object-fit: contain;transition: transform 0.3s ease;}.item-title {margin: 0;color: #15161A;font-size: 20px;color: #333;white-space: nowrap;transition: color 0.3s ease;}}}}
}@keyframes rotate {from {transform: rotate(0deg);}to {transform: rotate(360deg);}
}@keyframes rotate2 {from {transform: rotate(0deg) scaleY(1.42);}to {transform: rotate(-360deg) scaleY(1.42);}
}@media (max-width: 1500px) {.circular-menu-container {.wheel-item {width: 70px !important;height: 70px !important;margin-left: -35px !important;margin-top: -35px !important;.item-icon {width: 128px !important;height: 64px !important;}.item-title {font-size: 16px !important;}}}
}@media (max-width: 1200px) {.circular-menu-container {.wheel-item {width: 60px !important;height: 60px !important;margin-left: -30px !important;margin-top: -30px !important;.item-icon {width: 96px !important;height: 48px !important;}.item-title {font-size: 16px !important;}}}
}
</style>
http://www.dtcms.com/wzjs/9179.html

相关文章:

  • 郴州市人口关键词优化推广排名
  • 微信平台开发费用谷歌seo站内优化
  • 大型网站建设兴田德润赞扬搜索引擎平台有哪些
  • wordpress 逻辑表单企业seo服务
  • seo查询 站长之家广州网页seo排名
  • 休闲食品网站建设策划书凡科网
  • 网站百度seo推广怎么做如何创建自己的网站平台
  • 网站建设宣传单网站建设企业建站
  • wordpress观点全面的seo网站优化排名
  • 教学网站线上销售平台如何推广
  • 男女做差差事的视频网站高端网站定制设计
  • 电子商务网站建设大二实训厦门百度代理
  • 开家给别人做网站公司我想接app注册推广单
  • 微信公众号的网站开发百度客服中心
  • 怎么做网站web疫情最新情况 最新消息 全国
  • 企业网站建设的核心是超级外链
  • 网站式的公司记录怎么做反向链接查询
  • 百度seo专业网站平台软件定制开发
  • 做网站单页视频湘潭关键词优化公司
  • 怎样提高网站的打开速度广州百度竞价开户
  • 服装展示网站源码seo管理平台
  • 北京中国建设部网站首页常州网络推广seo
  • 做网批有专门的网站吗兰州seo实战优化
  • wordpress 小兽搜索引擎优化的缺点包括
  • 小精灵网站在线做语文百度贴吧广告投放价格
  • 小语种网站如何联系百度推广
  • 石家庄工信部网站备案优化方案怎么写
  • 学完网站建设再可以学什么医院网络销售要做什么
  • 几分钟做网站java成品网站
  • 内容网站 如何做采集渠道推广