hover的transition

2024-02-08 15:38
文章标签 hover transition

本文主要是介绍hover的transition,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

相信对于很多初学者,对于css3的transition到底是直接写在选择器上,还是写在选择器的hover上表示疑惑,下面给出两个实例,希望可以为您解惑。

<div id="demo1" class="demo">demo1</div>
<div id="demo2" class="demo">demo2</div>
.demo{width: 100px;height: 100px;text-align: center;line-height: 100px;border: 10px solid #ccc;border-radius: 60px;font-size: 20px;-webkit-backface-visibility: hidden;
}
#demo1{-webkit-transition:border-color 0.3s ease;-moz-transition:border-color 0.3s ease;-ms-transition:border-color 0.3s ease;-o-transition:border-color 0.3s ease;transition:border-color 0.3s ease;
}
#demo1:hover{border-color: #A3D7FF;
}
#demo2{-webkit-transition:all 1s ease;-moz-transition:all 1s ease;-ms-transition:all 1s ease;-o-transition:all 1s ease;transition:all 1s ease;
}
#demo2:hover{background-color:#A3D7FF;-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg);-webkit-transition:background-color 0.3s ease;-moz-transition:background-color 0.3s ease;-ms-transition:background-color 0.3s ease;-o-transition:background-color 0.3s ease;transition:background-color 0.3s ease;
}


这篇关于hover的transition的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/691473

相关文章

细胞核的分割与分类模型·hover net| 补充文档

小罗碎碎念 这期推文算是hover net系列的一个补充文档,把几个非常重要的脚本拿出来单独做了一个分析,感兴趣的自取。 extract_patches.pyconfig.pydataset.pyopt.pyrun_infer.py 一、extract_patches.py 1-1:加载和处理图像数据集 注意 dataset属于自建函数,所以一定要保证这个文件与你的代码执行文

ie6对hover兼容性问题的解决:

ie6对hover兼容性问题的解决: 1,在body里添加以下样式: behavior:url(../scripts/csshover.htc); csshover.htc可直接在网上下载 2,js解决 判断是否为ie6 window.οnlοad=function(){ var isIE=!!window.ActiveXobject: var is IE6=isIE&&XMLHt

vue3实现div盒子的内容hover上去时样式改变及部分元素的显隐

样式: hover后的样式: 整体盒子的背景颜色发生了改变,盒子内边距发生了改变,右下侧的箭头出现 实现方式: 利用mouseover和mouseout并结合css样式实现 template中: <divclass="new-item"v-for="(item, index) in newsList":key="index"@mouseover="showArrow(ind

MAC M1系统编译ffmpeg-gl-transition

MAC M1系统编译ffmpeg-gl-transition 1. 本人系统2. 编译💰系统准备2.1. 下载【ffmpeg-gl-transition】到用户家目录下,并解压2.2 下载ffmpeg源码2.3. brew安装GLEW + glfw32.4 复制vf_gltransition.c文件到ffmpeg2.5 修改ffmpeg源码文件2.6 设置库目录和头文件目录 3. conf

Uncaught (in promise) TypeError: r.append(...).style(...).transition is not a function

vue 中使用D3  项目在本地没有问题,但是部署到服务器nginx 上面 访问报这个错误,后来重新安装了D3 依赖,重新部署,重启nginx  问题就解决了。

css 清除伪类active,hover效果

来源 :hover伪类可以让我们设置鼠标移入时的样式。 鼠标移入并选择后,我们就不想让这个元素触发active以及hover的效果该怎么整呢? 解决 使用pointer-events:none: 注意:pointer-event会阻挡所有的事件,包括js的click之类的事件。 span{pointer-devent:none;}

Qml 中的那些坑(四)---MouseArea 的 Click / Hover 事件穿透

【写在前面】         我们在 Qml 中经常会遇到这样的情况:         有某个 Item ( 这里称为 Parent ),需要它在鼠标 Enter 时显示,鼠标 Exit 时隐藏。         这时候我们会用一个 MouseArea,然后处理 onEntered / onExited。         但是,有一个巨大的坑:         如果这个 Item 里嵌入

css :hover的使用

参考未整理 即鼠标移入类名为btn的元素时,她的子元素i样式发生改变 自身的样式也发生改变 ,如果他有更多的子元素也可以这样写

CSS3 新特性transform,transition,animation

一、transform css3引入了一些可以对网页元素进行变换的属性,比如旋转,缩放,移动,或者沿着水平或者垂直方向扭曲(斜切变换)等等。 transform属性有一项奇怪的特性,就是它们对于其周围的元素不会产生影响。换句话说,如果将一个元素旋转45度,它实际上是重叠在元素的上方,下方或者旁边。而不会移动其周围的内容。 旋转:transform:rotate(-45deg); 缩放:tr

css3 transition transform属性造成文字抖动

现象:信息栏第一行文字,最后总会抖动 代码: .match .match-item{width: 200px;height: 300px;display: inline-block;margin: 0 10px 0;box-shadow: 0 1px 6px 2px rgba(1,1,1,0.6);border-radius: 2px;border: 2px solid rgba(1