css hover图片hover效果兼容ie8
2017-11-12 23:08
351 查看
例子:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> *{ margin:0; padding:0; box-sizing:border-box; } .icon-img{ display: block; margin-top: 5px; width: 140px; height: 140px; margin: 9px auto 0; position: relative; overflow:hidden; border-radius:50%; } .icon-img img{ display:block; position: relative; border-radius:50%; z-index: 1; width: 95%; top: 50%; left: 50%; top: 0\9; left: 0\9; top: 50%\9\0; left: 50%\9\0; -moz-transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); transform: translate(-50%,-50%); -moz-transition: width .3s; -ms-transition: width .3s; -o-transition: width .3s; -webkit-transition: width .3s; transition: width .3s; } .icon-img:hover img { width:105%!important } .icon-img i{ position:absolute; left:0; top:0; width:140px; height:140px; border:3px solid #f00; border-radius:50%; z-index:2; } </style> </head> <body> <div class="icon-img"> <i></i> <img alt="" src="http://img.alicdn.com/bao/uploaded/TB1l3QFLpXXXXaoXVXXSutbFXXX.jpg"> </div> </body> </html>
相关文章推荐
- ie8兼容半透明效果css
- CSS 实现图片灰度效果 兼容各种浏览器
- CSS-expression实现图片缩放效果,兼容IE、FF
- 基于ueditor的兼容IE8的多图片上传+预览效果(JSP)
- 纯css图片自动缩放代码兼容IE6、IE7、IE8、Firefox
- 兼容IE6,IE7,IE8和Firefox的图片上传预览效果
- CSS 实现图片灰度效果 兼容各种浏览器
- 完美的CSS无图片圆角边框效果[有效果图][兼容各个浏览器]
- 图片放上效果ImageHover.css
- JS实现兼容IE6、IE7、IE8的图片上传前预览效果
- css背景图片填充样式background-size兼容ie8以下浏览器解决
- Css实现透明效果,兼容IE8
- 兼容IE6,IE7,IE8,friefox的图片上下左右滚动效果
- CSS图片倒影效果兼容firefox、IE等各主流浏览器
- CSS-expression实现图片缩放效果,兼容IE、FF
- CSS+Canvas实现图片灰度效果,兼容所有浏览器
- 两个相同效果的图片横向滚动 02-兼容IE8和Chrome浏览器
- CSS 实现图片灰度效果 兼容各种浏览器
- 1.纯css实现鼠标移动图片切换的效果
- +【CSS3】使用纯css代码实现图片轮播效果