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

浙江省建设科技推广中心网站企业vi包含哪些内容

浙江省建设科技推广中心网站,企业vi包含哪些内容,建行移动门户网站,网站备案情况查询实现流光边框一般是用渐变背景加动画实现#xff0c;然后使用内部盒子遮挡内部空间#xff0c;达到边框流光的效果 思路#xff1a;背景渐变旋转动画 功能#xff1a; 自定义渐变#xff08;是否渐变不渐变没有流光效果#xff0c;渐变颜色#xff0c;渐变角…实现流光边框一般是用渐变背景加动画实现然后使用内部盒子遮挡内部空间达到边框流光的效果 思路背景渐变旋转动画 功能 自定义渐变是否渐变不渐变没有流光效果渐变颜色渐变角度渐变宽度自定义动画时间 1 基础实现 templateBox 测试 /Box /template script setup langts import Box from ./Box.vue; /script style scoped/styletemplatediv classboxdiv classcontentslot/slot/div/div /template script setup langts/script style scoped langscss .box {display: flex;justify-content: center;align-items: center;text-align: center;position: relative;width: 100%;height: 100%;padding: 5px;border-radius: 10px;overflow: hidden;:before {content: ;background-image: linear-gradient(120deg, #5ddcff, #3c67e3 40%, #4e00c2);position: absolute;z-index: 0;padding-left: 130%;padding-bottom: 130%;animation: rotate 8s linear infinite;}.content {height: 100%;width: 100%;display: flex;align-items: center;padding: 24px 20px;background: #f1d674;z-index: 2;border-radius: 6px;} } keyframes rotate {0% {transform: rotate(0deg);}100% {transform: rotate(360deg);} } /style 动图略 2 封装组件 2.1 圆形边框 使用mask属性使得中间部分背景不被遮挡 templatediv classbox :style{ width: width px, height: height px }slot/slot/div /template script setup langts const props defineProps({width: {type: Number, //容器宽default: 100,},height: {type: Number, //容器高default: 100,},colors: {//颜色数组type: Array,default: () [{color: #64dcfd,width: 0,},{color: #406cf1,width: 100,},{color: #4501ac,width: 101,},],},angle: {//渐变角度type: Number,default: 120,},borderWidth: {//流光边框宽度type: Number,default: 10,},gradient: {//是否渐变type: Boolean,default: true,},duration: {//动画时间type: String,default: 5s,}, });const background computed(() {const positions [];const colorsCopy JSON.parse(JSON.stringify(props.colors));colorsCopy.forEach((s, index) {const sum colorsCopy.slice(0, index).reduce((a, b) a b.width, 0);if (!props.gradient) {positions.push(sum);}positions.push(sum s.width);});return linear-gradient(${props.angle}deg, ${colorsCopy.map((s, index) {if (!props.gradient) {return ${s.color} ${positions[index]}px, ${s.color} ${positions[2 * index 1]}px;}return ${s.color} ${positions[index]}px;}).join(,)}); });const borderLR computed(() {return props.width / 2 - props.borderWidth px; }); const borderLRShink computed(() {return props.width / 2 - props.borderWidth - 1 px; }); /script style scoped langscss .box {display: flex;justify-content: center;align-items: center;position: relative;width: 100%;height: 100%;border-radius: 50%;overflow: hidden;:before {content: ;background-image: v-bind(background);position: absolute;width: 100%;height: 100%;border-radius: 50%;animation: rotate v-bind(duration) linear infinite;mask: radial-gradient(transparent,transparent v-bind(borderLRShink),#000 v-bind(borderLR));-webkit-mask: radial-gradient(transparent,transparent v-bind(borderLRShink),#000 v-bind(borderLR));} } keyframes rotate {0% {transform: rotate(0deg);}100% {transform: rotate(360deg);} } /style​​​​​​​ 2.2 矩形边框 使用伪元素自定义中间部分背景 templatediv classbox :style{ width: width px, height: height px }slot/slot/div /template script setup langts const props defineProps({width: {type: Number, //容器宽default: 100,},height: {type: Number, //容器高default: 100,},colors: {//颜色数组type: Array,default: () [{color: #64dcfd,width: 0,},{color: #406cf1,width: 100,},{color: #4501ac,width: 101,},],},angle: {//渐变角度type: Number,default: 120,},borderWidth: {//左右流光边框宽度type: [Array, Number],default: [20, 5],},gradient: {//是否渐变type: Boolean,default: true,},duration: {//动画时间type: String,default: 5s,},innerBackground: {//内部背景type: String,default: #FFF,}, });const background computed(() {const positions [];const colorsCopy JSON.parse(JSON.stringify(props.colors));colorsCopy.forEach((s, index) {const sum colorsCopy.slice(0, index).reduce((a, b) a b.width, 0);if (!props.gradient) {positions.push(sum);}positions.push(sum s.width);});return linear-gradient(${props.angle}deg, ${colorsCopy.map((s, index) {if (!props.gradient) {return ${s.color} ${positions[index]}px, ${s.color} ${positions[2 * index 1]}px;}return ${s.color} ${positions[index]}px;}).join(,)}); });const innerWidth computed(() {let doubleBorderWidth 0;if (Array.isArray(props.borderWidth)) {if (props.borderWidth.length 2) {doubleBorderWidth props.borderWidth[1] * 2;} else if (props.borderWidth.length 1) {doubleBorderWidth props.borderWidth[0] * 2;}} else {doubleBorderWidth props.borderWidth * 2;}return props.width - doubleBorderWidth px; }); const innerheight computed(() {let doubleBorderWidth 0;if (Array.isArray(props.borderWidth)) {if (props.borderWidth.length 2) {doubleBorderWidth props.borderWidth[0] * 2;} else if (props.borderWidth.length 1) {doubleBorderWidth props.borderWidth[0] * 2;}} else {doubleBorderWidth props.borderWidth * 2;}return props.height - doubleBorderWidth px; }); const colorSize computed(() {return (Math.ceil(Math.sqrt(props.width * props.width props.height * props.height)) px); }); /script style scoped langscss .box {display: flex;justify-content: center;align-items: center;position: relative;width: 100%;height: 100%;overflow: hidden;:before {content: ;background-image: v-bind(background);position: absolute;width: v-bind(colorSize);height: v-bind(colorSize);animation: rotate v-bind(duration) linear infinite;}:after {content: ;background: v-bind(innerBackground);position: absolute;z-index: 1;width: v-bind(innerWidth);height: v-bind(innerheight);} } keyframes rotate {0% {transform: rotate(0deg);}100% {transform: rotate(360deg);} } /style
http://www.sczhlp.com/news/155569/

相关文章:

  • 东莞seo建站排名优秀网站开发
  • 建设部网站园林绿化资质标准wordpress雪人主题
  • 深圳国外网站建设wordpress主题加入html压缩
  • 河南省建设厅网站考试成绩查询服装外贸行业发展趋势
  • 宁波高端网站制作公司额尔古纳网站建设价格
  • 做网站服务器的配置设计手机网站
  • 网站备案为什么这么慢怎么做微商的微网站
  • 十堰网站设计公司wordpress带会员主题
  • 网站规划与网页设计总结wordpress分类目录浏览权限
  • 山西企业网站建设做网站不给钱
  • 泉州网站建设免费建立自己微网站
  • 网站怎么在百度搜不到南通 网站优化
  • 网站建设价格裙网站视频主持人制作
  • 手机网站开发有前途营销页面
  • 网站开发的前端到底是什么搜索引擎优化的步骤有哪些
  • 怎么阐述自己做的网站wordpress邮件通知代码
  • excel动态表格图表制作太原seo排名收费
  • 中核华兴建设有限公司网站杂志 wordpress
  • 清远专业网站建设青岛建设集团官方网站
  • wordpress文章末尾加上相关文章网站如何从行为数据进行优化
  • 卡盟网站开发小程序的制作步骤
  • 搜索引擎网站优化推广WordPress文章更新器
  • 个人博客网站怎么做沂水网站优化推广
  • 网站建设可以给公司带来房价必涨的十大城市
  • 虚拟机仅主机模式下使用ssh远程连接Linux(EHEL8)连接慢,需要等待30秒以上
  • 信奥大联赛周赛(提高组)#2515-S 赛后盘点
  • seo优化网站网页教学wordpress百度搜索无缩略图
  • 长沙网站排名方案wordpress后台演示
  • 个人网站不能有盈利性质郑州展厅设计公司
  • 手机网站开发流程.广西seo排名