您现在的位置是:网站首页> 编程资料编程资料
CSS3 实现的缩略图悬停效果JS+CSS3透明的霜雾玻璃图片预览特效CSS3几何透明层文本悬停变色特效代码css3悬停按钮-CSS3鼠标悬停按钮阴影缩放特效代码CSS3悬停展开旋转菜单特效代码CSS3新拟态图标悬停动画特效代码CSS3实现卡片悬停图文遮罩显示特效代码
2021-09-03
919人已围观
简介 这篇文章主要介绍了CSS3 实现的缩略图悬停效果的示例代码帮助大家更好的理解和使用CSS3,感兴趣的朋友可以了解下
实现效果

实现代码
html
Thumbnail Hover Effect with CSS3
Images featured in this demo are the works of Mernan Behairi. Inspired by an old post of @Sohtanaka. It originally uses jQuery. Access original tutorial and demo.
css3
@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:700); html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } body { background-color: #f2f2f2; } header { width: 100%; background-color: #77cdb4; text-align: center; } h1 { font-family: 'Roboto Condensed', sans-serif; color: #FFF; font-size: 2.3em; } em { color: #232027; } .wrapper { width: 40%; margin: 40px auto; } div.gallery { margin-top: 30px; } div.gallery ul { list-style-type: none; margin-left: 35px; } /* animation */ div.gallery ul li, div.gallery li img { -webkit-transition: all 0.1s ease-in-out; -moz-transition: all 0.1s ease-in-out; -o-transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out; } div.gallery ul li { position: relative; float: left; width: 130px; height: 130px; margin: 5px; padding: 5px; z-index: 0; } /* Make sure z-index is higher on hover */ /* Ensure that hover image overlapped the others */ div.gallery ul li:hover { z-index: 5; } /* Image is position nicely under li */ div.gallery ul li img { position: absolute; left: 0; top: 0; border: 1px solid #dddddd; padding: 5px; width: 130px; height: 130px; background: #f0f0f0; } div.gallery ul li img:hover { width: 200px; height: 200px; margin-top: -130px; margin-left: -130px; top: 65%; left: 65%; } p.attribution { font-family: 'Consolas'; color: #000; clear: both; text-align: center; line-height: 25px; padding-top: 30px; } p.attribution a { color: #4c8d7c; } /* Responsive hack */ @media only screen and (min-width: 499px) and (max-width: 1212px) { .wrapper { width: 500px; } } @media only screen and (max-width: 498px) { .wrapper { width: 300px; } div.gallery ul { list-style-type: none; margin: 0; } }以上就是CSS3 实现的缩略图悬停效果的详细内容,更多关于CSS3 缩略图悬停的资料请关注其它相关文章!
相关内容
- CSS3 实现的火焰动画CSS3实现文字浮雕效果,镂刻效果,火焰文字通过CSS的滤镜实现火焰效果的示例如何通过 CSS 写出火焰效果
- CSS实现背景图片屏幕自适应的实现css display table 自适应高度、宽度问题的解决详解CSS多种三列自适应布局实现css3实现自适应浏览器图片布局特效CSS实现表格首行首列固定和自适应窗口的实例代码css实现六种自适应两栏布局方式CSS将img图片填满父容器div并自适应容器大小css实现两栏布局,左侧固定宽,右侧自适应的多种方法
- CSS3 实现的加载动画纯CSS3进度条渐变加载特效代码纯css3巫师法术加载特效代码一组纯css3加载图标动画特效代码大全纯css3加载loading发光变色动画特效代码纯css3制作的发光loading图标加载动画特效源码CSS3实现渐变的loading加载进度条特效代码jQuery+CSS3实现的双层圆环形进度条加载动画特效CSS3+SVG实现的电影摄影机loading加载动画效果源码纯CSS3 实现的速度仪表盘加载动画效果源码CSS3实现的彩色粗线条爱心形状加载动画特效源码
- 子元素margin-top导致父元素移动的问题解决css中子元素设置margin-top为什么影响了父元素CSS 同级元素position:fixed和margin-top共同使用的问题margin-top塌陷问题的现象与解决的具体方法margin-top负值解决label 文字与input 垂直居中对齐问题父元素与子元素之间的margin-top问题(css hack)
- 纯CSS3实现运行时钟的示例代码css3 利用transform打造走动的2D时钟css3一个简易的 LED 数字时钟实现方法利用CSS3 动画 绘画 圆形动态时钟CSS实现漂亮的时钟动画效果的实例代码
- div水平布局两边对齐的三种实现方法在ul中使li水平布局的两种方法
- CSS3选择器新增问题的实现CSS 选择所有子元素添加样式的方法CSS选择器中的正则表达式使用CSS3 新增选择器的实例一文教你玩转CSS 组合选择器
- CSS世界--代码实践之图片alt信息呈现CSS实现背景图片屏幕自适应的实现一篇文章带你学习CSS3图片边框css实现文字在背景图片之上
- waterfall瀑布流布局+动态渲染的实现3种方式实现瀑布流布局小结详解纯css实现瀑布流(multi-column多列及flex布局)css3 column实现卡片瀑布流布局的示例代码用CSS3实现瀑布流布局的示例代码CSS3实现瀑布流布局与无限加载图片相册的实例代码瀑布流布局的两种实现方式:传统多列浮动和绝对定位布局
- CSS 奇思妙想边框动画效果的实现一文教你玩转CSS border(边框)CSS3 按钮边框动画的实现CSS3 实现发光边框特效两款纯CSS3鼠标经过按钮边框动画特效一篇文章带你学习CSS3图片边框css3多种边框悬停按钮填色动画特效css 透明边框background-clip妙用CSS3实现缺角矩形,折角矩形以及缺角边框CSS边框长度控制功能的实现CSS实现半透明边框与多重边框的场景分析









