transition 用法

article/2025/9/19 21:19:32
一、animation有哪些属性值
animation-name 规则名称
animation-duration 动画时间
animation-timing-function
animation-delay
animation-iteration-count
animation-direction
二、transition有哪些属性:
transition-property 对哪个属性设置过渡
transition-duration 过渡周期
transition-timing-function速度曲线
transition-delay 延迟时间
合写
transition: property duration timing-function delay;
设置多个属性用逗号
transition: width .2s linear .3s , height .2s linear .3s;
速度曲线有哪些
linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n)
linear:规定以相同速度开始至结束的过渡效果(等于cubic-bezier(0,0,1,1)
ease:慢速开始然后变快然后慢速结束
ease-in:慢速开始
ease-out:慢速结束
ease-in-out:慢速开始,慢速结束
cubic-bezier:自定义数值 可能的值在0到1之间 可以用浏览器调节速度曲线
怎么用transition实现一个hover按钮 环绕border效果:
原理:看见的都是假象
用两个div
其中一个设置border-bottom-color和border-left-color
另一个设置border-top-color和border-right-color
让宽高从零开始过渡 再设置过渡的时间延迟
捣鼓一下 时间差
代码:
/*按钮、输入框 环绕边框 动画效果*/
.test{
position: relative;
width: 100px;
height: 100px;
margin-left: 400px;
border: 1px solid red;
}
.test:before {
content: '';
display: block;
position: absolute;
box-sizing: border-box;
border: 1px solid transparent;
width: 0;
height: 0;
bottom: 0;
right: 0;
-webkit-transition: border-color 0s ease-in 0.4s,width 0.2s ease-in 0.2s,height 0.2s ease-in;
transition: border-color 0s ease-in 0.4s,width 0.2s ease-in 0.2s,height 0.2s ease-in;
}
/*hover和未hover都设置transition才能实现鼠标移出时有个原路返回的效果*/
.test:hover:before {
width: 100%;
height: 100%;
border-bottom-color: #367dff;
border-left-color: #367dff;
-webkit-transition: border-color 0s ease-out 0.4s,width 0.2s ease-out 0.4s,height 0.2s ease-out 0.6s;
transition: border-color 0s ease-out 0.4s,width 0.2s ease-out 0.4s,height 0.2s ease-out 0.6s;
}
.test:after {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
box-sizing: border-box;
border: 1px solid transparent;
width: 0;
height: 0;
-webkit-transition: border-color 0s ease-in 0.8s,width 0.2s ease-in 0.6s,height 0.2s ease-in 0.4s;
transition: border-color 0s ease-in 0.8s,width 0.2s ease-in 0.6s,height 0.2s ease-in 0.4s;
}
.test:hover:after {
width: 100%;
height: 100%;
border-top-color: #367dff;
border-right-color: #367dff;
-webkit-transition: width 0.2s ease-out,height 0.2s ease-out 0.2s;
transition: width 0.2s ease-out,height 0.2s ease-out 0.2s;
}

转载于:https://www.cnblogs.com/zhangyonghan/p/11525788.html


http://chatgpt.dhexx.cn/article/s5LgWe1g.shtml

相关文章

迁移学习——Transitive Transfer Learning

《Transitive Transfer Learning》学习 Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining 文章目录 摘要关键词 一、介绍二、问题定义三、中间域选择四、传递知识转移4.1非负矩阵三因子分解4.2迁移学习的NMTF4.3TTL迁移学…

Provides transitive vulnerable dependency - Intellij IDEA

打开pom.xml报 Provides transitive vulnerable dependency org.apache.commons:commons-collections4:4.1 Cx78f40514-81ff 7.5 Uncontrolled Recursion vulnerability pending CVSS allocation Results powered by Checkmarx© 查了下插件列表,idea自带了一…

maven编译问题之 -The POM for XXX is invalid, transitive dependencies (if any) will not be available

问题一: 把父工程tao-parent install 到maven本地仓后,接着install tao-common工程,然后报错 报错信息如下: [WARNING] The POM for com.fasterxml.jackson.core:jackson-databind:jar:2.4.2 is invalid, transitive dependencie…

Provides transitive vulnerable dependency org.yaml:snakeyaml:1.33

一、错误介绍 新创建了一个springboot3的项目&#xff0c;弹出警告。 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.0.1</version><relativePath/>…

CSS3 Transition

Transition 简介 Transition 可以设置 CSS 属性的过渡效果&#xff0c;它有以下几个属性。 transition-property 用于指定应用过渡属性的名称transition-duration 用于指定这个过渡的持续时间transition-delay 用于指定延迟过渡的时间transition-timing-function 用于指定过渡…

Gradle依赖项学习总结,dependencies、transitive、force、exclude的使用与依赖冲突解决...

http://www.paincker.com/gradle-dependencies https://docs.gradle.org/current/userguide/dependency_management.html http://www.concretepage.com/build-tools/gradle/gradle-exclude-transitive-dependency-example Gradle是一个非常好用的编译工具&#xff0c;特别是继承…

Gradle依赖项之transitive/exclude/force/(+)

传递(transitive)排除(exclude)强制(force)动态版本() implementation(com.xxx:xxx:1.0.0aar) {transitive truechanging trueforce trueexclude group: com.xxx, module: xxx}强制使用指定版本号 configurations.all {resolutionStrategy {force com.github.bumptech.glid…

mptcp on mininet

这篇文章主要记录mptcp在mininet上的仿真实验。mininet中的网络实验&#xff0c;数据包走的是内核协议栈。这样得出的结果&#xff0c;好处就是实际网络协议栈的性能。缺点就是&#xff0c;要验证新的想法&#xff0c;需要修改内核协议栈。而且关于内核中的数据&#xff0c;比如…

mininet操作

mn:启动mininet sudo mn -- topo single , 3 -- mac -- switch ovsk -- controller remote &#xff08;1&#xff09;--topo:指定openflow网络拓扑&#xff0c;四种类型的openflow网络拓扑&#xff1a;tree&#xff0c;single&#xff0c;linear&#xff0c;minimal ①缺省情…

mininet 主机双网关拓扑设计

这次的拓扑是一个主机拥有两个接口&#xff0c;两个接口分别有不同的网关&#xff0c;拓扑图如下&#xff0c;拓扑可以通过前两篇中提到的miniedit.py去生成&#xff1a; 主要配置指令如下&#xff1a; 截得不全直接看代码吧 #!/usr/bin/pythonfrom mininet.net import Minine…

Mininet笔记-基本命令

命令详解 拓扑构建命令 –topo  单一&#xff08;single&#xff09;拓扑&#xff0c;永远只有一个交换机&#xff0c;主机&#xff08;host&#xff09;可以有N个  线形&#xff08;linear&#xff09;拓扑&#xff0c;可以有多个交换机和主机&#xff0c;每个交换机只连接…

mininet基本操作

mininet是由斯坦福大学基于Linux Container架构开发的一个进程虚拟化网络仿真工具&#xff0c;可以创建一个包含主机&#xff0c;交换机&#xff0c;控制器和链路的虚拟网络&#xff0c;其交换机支持OpenFlow&#xff0c;具备高度灵活的自定义软件定义网络。 在ubuntu系统中安…

mininet编程

代码 区分constructor and object #!/usr/bin/python from mininet.topo import Topo from mininet.net import Mininet from mininet.util import dumpNodeConnections from mininet.log import …

mininet实验部分总结

一、Mininet简介 Mininet是一个可以在有限资源的普通电脑上快速建立大规模SDN原型系统的网络仿真工具。该系统由虚拟的终端节点&#xff08;End-Host&#xff09;、OpenFlow交换机、控制器&#xff08;也支持远程控制器&#xff09;组成&#xff0c;这使得它可以模拟真实网络&…

Mininet应用实践

安装&#xff1a; 参考 &#xff1a; https://www.cnblogs.com/cotyb/p/5042072.html https://blog.csdn.net/Mr_Wanderer/article/details/107028267 https://blog.csdn.net/qq_19696893/article/details/123747960 开启ovsdb-server配置数据库&#xff1a;有两种方式&#x…

【学习笔记】Mininet 入门

【学习笔记】Mininet入门实战 课程介绍 Mininet是由一些虚拟的终端节点、交换机、路由器连接而成的一个网络仿真器&#xff0c;它采用轻量级的虚拟化技术使得系统可以和真实网络相媲美。 Mininet可以很方便地创建一个支持SDN的网络&#xff1a;host就像真实的电脑一样工作&…

【Mininet】基础篇:Mininet创建简单网络拓扑及简单网络拓扑脚本编写

大家好&#xff0c;我是文思月&#xff01; 每文一言&#xff1a;不要假装努力&#xff0c;结果不会陪你演戏&#xff01; 本篇文章&#xff1a; 使用Mininet创建简单的网络拓扑&#xff0c;并创建网络拓扑脚本。 正文如下&#xff1a; 1. 最小网络拓朴 创建最小的网络拓扑…

【Mininet】安装篇:安装Mininet

大家好&#xff0c;我是皮皮猫吖&#xff01; 每文一言&#xff1a;改变你的生活&#xff0c;现在或者从不 本篇文章&#xff1a; 本文是安装 mininet 的简单过程。 正文如下&#xff1a; 一、Mininet的安装 第一步&#xff1a;安装git apt install git 第二步&#xff…

mininet基础

mininet介绍 一、Mininet是什么 Mininet是由斯坦福大学基于Linux Container架构开发的一个进程虚拟化网络仿真工具&#xff0c;可以创建一个包含主机&#xff0c;交换机&#xff0c;控制器和链路的虚拟网络&#xff0c;其交换机支持OpenFlow&#xff0c;具备高度灵活的自定义…

第一讲——mininet的安装和使用

第一讲——mininet的安装和使用 1.调出字符界面。 2.进入root。 3.直接安装git&#xff0c;发现无法安装&#xff0c;原因是没有安装源。 4.更新安装源。 5.再次安装git&#xff0c;发现可以安装。 6.下载mininet。 7.安装mininet。 8.查看mininet安装情况和创建线性网络拓扑。…