视频直播app源码,实现一个展开和关闭的动画效果
视频直播app源码,实现一个展开和关闭的动画效果
1 | <template><br> <div><br> <el-button @click= "changeShow(true)" >展开</el-button><br> <el-button @click= "changeShow(false)" >关闭</el-button><br> <div class = "mr_sty" : class = "[{'animationWidth1':isShow === 1},{'animationWidth2':isShow === 2},{'animationWidth3':isShow === 3},{'animationWidth4':isShow === 4}]" ><br> <div style= "width: 300px;height:100px;" ><br> 你好你好你好<br> </div><br> </div><br> </div><br> <br></template><br> <br><script><br> export default {<br> data() {<br> return {<br> isShow: 1,<br> }<br> },<br> methods: {<br> changeShow(type) {<br> //展开<br> if (type) {<br> this.isShow = 2<br> setTimeout(() => {<br> this.isShow = 3<br> }, 3000)<br> } else {<br> //收起<br> this.isShow = 4<br> setTimeout(() => {<br> this.isShow = 1<br> }, 3000)<br> }<br> }<br> }<br> }<br></script><br> <br><style scoped><br> <br> .mr_sty{<br> overflow: hidden;<br> }<br> .animationWidth1{<br> width: 0;<br> height:0;<br> background: red;<br> }<br> .animationWidth2{<br> width: 300px;<br> height:100px;<br> background: red;<br> position:relative;<br> animation:animationWidth2 3s infinite;<br> animation-iteration-count: 1;<br> }<br> @keyframes animationWidth2 {<br> 0% {width:0}<br> 100% {width:300px}<br> }<br> .animationWidth3{<br> width: 300px;<br> height:100px;<br> background: red;<br> }<br> .animationWidth4{<br> width: 300px;<br> height:100px;<br> background: red;<br> position:relative;<br> animation:animationWidth4 3s infinite;<br> animation-iteration-count: 1;<br> }<br> @keyframes animationWidth4 {<br> 0% {width:300px}<br> 100% {width:0}<br> }<br></style> |
以上就是视频直播app源码,实现一个展开和关闭的动画效果, 更多内容欢迎关注之后的文章
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
2021-08-12 游戏APP源码macOs, launchpad 列表存储位置
2021-08-12 实现小游戏网站源码unity倒计时滑动条任意输入
2021-08-12 获取PHP游戏源码spine动画时间