Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
c1f0b69d
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6005
Star
91
Fork
164
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c1f0b69d
编写于
1月 03, 2024
作者:
张
张磊
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
transition-duration 添加单位
上级
2f781c49
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
15 deletion
+15
-15
pages/API/choose-image/choose-image.uvue
pages/API/choose-image/choose-image.uvue
+1
-1
pages/CSS/transition/transition.uvue
pages/CSS/transition/transition.uvue
+8
-8
pages/component/general-event/transition-event.uvue
pages/component/general-event/transition-event.uvue
+3
-3
pages/template/half-screen/half-screen.uvue
pages/template/half-screen/half-screen.uvue
+3
-3
未找到文件。
pages/API/choose-image/choose-image.uvue
浏览文件 @
c1f0b69d
...
@@ -288,6 +288,6 @@
...
@@ -288,6 +288,6 @@
border-style: solid;
border-style: solid;
padding: 20rpx;
padding: 20rpx;
transition: height;
transition: height;
transition-duration: 300;
transition-duration: 300
ms
;
}
}
</style>
</style>
pages/CSS/transition/transition.uvue
浏览文件 @
c1f0b69d
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
propertyChangeBackground() {
propertyChangeBackground() {
if (!this.isSetTransition) {
if (!this.isSetTransition) {
this.propertyStyleBackground?.style?.setProperty("transition-property", "background-color")
this.propertyStyleBackground?.style?.setProperty("transition-property", "background-color")
this.propertyStyleBackground?.style?.setProperty("transition-duration", "1000")
this.propertyStyleBackground?.style?.setProperty("transition-duration", "1000
ms
")
this.isSetTransition = true
this.isSetTransition = true
}
}
this.propertyStyleBackground?.style?.setProperty("background-color", this.isTransitionpropertystyleBackground
this.propertyStyleBackground?.style?.setProperty("background-color", this.isTransitionpropertystyleBackground
...
@@ -185,27 +185,27 @@
...
@@ -185,27 +185,27 @@
.transition-width {
.transition-width {
transition-property: width;
transition-property: width;
transition-duration: 1
000
;
transition-duration: 1
s
;
}
}
.transition-margin {
.transition-margin {
transition-property: margin-left, margin-top;
transition-property: margin-left, margin-top;
transition-duration: 1
000
;
transition-duration: 1
s
;
}
}
.transition-padding {
.transition-padding {
transition-property: padding-left, padding-top;
transition-property: padding-left, padding-top;
transition-duration: 1
000
;
transition-duration: 1
s
;
}
}
.transition-background {
.transition-background {
transition-property: background-color, opacity;
transition-property: background-color, opacity;
transition-duration: 1
000
;
transition-duration: 1
s
;
}
}
.transition-transform {
.transition-transform {
transition-property: transform;
transition-property: transform;
transition-duration: 1
000
;
transition-duration: 1
s
;
}
}
.transition-border {
.transition-border {
...
@@ -213,11 +213,11 @@
...
@@ -213,11 +213,11 @@
border-color: brown;
border-color: brown;
border-style: solid;
border-style: solid;
transition-property: border-color;
transition-property: border-color;
transition-duration: 1
000
;
transition-duration: 1
s
;
}
}
.transition-position {
.transition-position {
transition-property: left;
transition-property: left;
transition-duration: 1
000
;
transition-duration: 1
s
;
}
}
</style>
</style>
pages/component/general-event/transition-event.uvue
浏览文件 @
c1f0b69d
...
@@ -30,14 +30,14 @@
...
@@ -30,14 +30,14 @@
this.buttonValue = "关闭图片旋转"
this.buttonValue = "关闭图片旋转"
this.times = this.times + 1
this.times = this.times + 1
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transition-duration', '2000')
this.element!.style.setProperty('transition-duration', '2000
ms
')
this.isStart = true
this.isStart = true
} else {
} else {
this.isStart = false
this.isStart = false
this.times = 0
this.times = 0
this.buttonValue = "开启图片旋转"
this.buttonValue = "开启图片旋转"
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transition-duration', '0')
this.element!.style.setProperty('transition-duration', '0
s
')
}
}
},
},
onEnd() {
onEnd() {
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
height: 400rpx;
height: 400rpx;
margin: 50rpx auto;
margin: 50rpx auto;
border-radius: 200rpx;
border-radius: 200rpx;
transition-duration: 2000;
transition-duration: 2000
ms
;
transition-property: transform;
transition-property: transform;
transition-timing-function: linear;
transition-timing-function: linear;
transform: rotate(0deg);
transform: rotate(0deg);
...
...
pages/template/half-screen/half-screen.uvue
浏览文件 @
c1f0b69d
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
this.halfNode?.style?.setProperty('transitionTimingFunction', 'linear');
this.halfNode?.style?.setProperty('transitionTimingFunction', 'linear');
time *= (this.halfHeight / this.totalHeight); //计算关闭动画时间
time *= (this.halfHeight / this.totalHeight); //计算关闭动画时间
}
}
this.halfNode?.style?.setProperty('transitionDuration', time.toFixed(0));
this.halfNode?.style?.setProperty('transitionDuration', time.toFixed(0)
+"ms"
);
this.halfNode?.style?.setProperty('transitionProperty', 'top');
this.halfNode?.style?.setProperty('transitionProperty', 'top');
this.halfNode?.style?.setProperty('top', top.toFixed(2));
this.halfNode?.style?.setProperty('top', top.toFixed(2));
setTimeout(() => {
setTimeout(() => {
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
},
},
resumeHalfScreen() {
resumeHalfScreen() {
let time = 300;//(500*this.halfOffset/this.halfHeight).toFixed(0); //回弹动画时间
let time = 300;//(500*this.halfOffset/this.halfHeight).toFixed(0); //回弹动画时间
this.halfNode?.style?.setProperty('transitionDuration', time.toFixed(0));
this.halfNode?.style?.setProperty('transitionDuration', time.toFixed(0)
+"ms"
);
this.halfNode?.style?.setProperty('transitionTimingFunction', 'ease-in-out');
this.halfNode?.style?.setProperty('transitionTimingFunction', 'ease-in-out');
this.halfNode?.style?.setProperty('transitionProperty', 'transform');
this.halfNode?.style?.setProperty('transitionProperty', 'transform');
this.halfNode?.style?.setProperty('transform', 'translateY(0px)');
this.halfNode?.style?.setProperty('transform', 'translateY(0px)');
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
/*ease ease-in ease-out ease-in-out linear step-start step-end*/
/*ease ease-in ease-out ease-in-out linear step-start step-end*/
transition-property: top;
transition-property: top;
transition-duration: 0;
transition-duration: 0
ms
;
visibility: hidden;
visibility: hidden;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录