css3实现图片划过一束光闪过效果
css3实现鼠标移入图片划过一束光闪过效果:
可以通过 https://littlehiuman.github.io/cssEffect/flashLightPic.html 查看效果。
https://github.com/littleHiuman/littleHiuman.github.io 求点star~~~
html:
<a href="#" class="img">
<img src="http://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/d53f8794a4c27d1e8ff07fe61fd5ad6eddc43839.jpg" width="800"/>
</a>
css:
.img {
display: block;
position: relative;
width: 800px;
height: 450px;
margin: 0 auto;
}
.img:before {
content: '';
position: absolute;
width: 200px;
height: 100%;
top:;
left: -150px;
overflow: hidden;
background: -moz-linear-gradient(
left,
rgba(255, 255, 255, 0) 0,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0) 100%
);
background: -webkit-gradient(
linear,
left top,
right top,
color-stop(0%, rgba(255, 255, 255, 0)),
color-stop(50%, rgba(255, 255, 255, 0.2)),
color-stop(100%, rgba(255, 255, 255, 0))
);
background: -webkit-linear-gradient(
left,
rgba(255, 255, 255, 0) 0,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0) 100%
);
background: -o-linear-gradient(
left,
rgba(255, 255, 255, 0) 0,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0) 100%
);
-webkit-transform: skewX(-25deg);
-moz-transform: skewX(-25deg);
}
.img:hover:before {
left: 150%;
transition: left 1s ease 0s;
}
css3实现图片划过一束光闪过效果的更多相关文章
- 黄聪:css3实现图片划过一束光闪过效果(图片光影掠过效果)
CSS代码 .guangshu { display:block; position: relative; width:800px; height:450px; margin:0 auto;} .gua ...
- HTML5+CSS3实现图片可倾斜摆放的动画相册效果
先看看效果:其中鼠标悬浮在图片上会有动态效果图 直接上代码: css文件 @CHARSET "UTF-8"; *{ padding:0px; margin:0px; } div{ ...
- CSS3实现图片黑白滤镜居中,hover缩放遮罩的效果
hover: 在前端开发中经常会遇到项目展示,往往会采用卡片方式来描述.众多网站中,普遍采用CSS3的scale()方法来实现交互. 本文即是利用纯CSS实现图片居中缩放,此类方法各大网站均有应 ...
- 纯CSS3向右循环闪过效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...
- CSS3之图片3D翻转效果(网页效果--每日一更)
今天,带来的是纯CSS3的效果--图片3D翻转. 请看效果:亲,请点击这里 这个效果主要还是运用了CSS3的transform变形属性,与上个效果不同的是,这次并不是动画,所以没有采用animatio ...
- JQ基础练习---图片划过变暗
简单分享下,划过一张图片其余图片变暗,图片划过变暗的简单效果,JQ实现主要是css写法跟思路变化. <script src="http://ajax.googleapis.com/aj ...
- jQuery/CSS3实现图片层叠展开特效
这是一款基于jQuery和CSS3的图片层叠展开特效,让鼠标滑过图片时即可触发这些特效.其中有一款就像扇子展开收拢一样,看起来效果都非常不错.当然本文主要还是来分析一下用jQuery实现这一效果的方法 ...
- 第八十节,CSS3边框图片效果
CSS3边框图片效果 学习要点: 1.属性初探 2.属性解释 3.简写和版本 本章主要探讨HTML5中CSS3中边框图片背景的效果,通过这个新属性让边框更加的丰富多彩. 一.属性解释 CSS3 ...
- 使用纯css3实现图片轮播
<!DOCTYPE html> <html> <head> <title> 飛天网事--纯CSS代码实现图片轮播 </title> < ...
随机推荐
- mysql学习第三天笔记
连接连接是在多个表之间通过一定的连接条件,使表之间发生关联,进而能从多个表之间获取数据.在 WHERE子句中书写连接条件. 如果在多个表中出现相同的列名,则需要使用表名作为来自该表的列名的前缀. N个 ...
- ElasticSearch 之 Client
在使用ElasticSearch的时候,我们需要与Cluster通信,Java版本的API提供了几种方式来构造Client,进而通过Client操作Cluster. 1)使用Node与clusto ...
- dubbo的rpc异常
Exception in thread "main" com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method ...
- oracle 用户被锁定解锁方法
修改了用户密码,第二天过来发现用户被锁定,晚上走的时候还好好的 . alter profile DEFAULT limit FAILED_LOGIN_ATTEMPTS UNLIMITED; alter ...
- C#方法参数
使用静态字段来模拟全局变量. 如果调用者想要得到被调用者的值: 1.返回值 2.不管是实参还是形参,都是在内存中开辟了空间的. 3.方法的功能一定要单一. GetMax(int n1,int n2) ...
- 使用Windows SFC和DISM工具来解决服务器OS问题
TechTarget中国原创] 随着使用时间的越来越多,Windows服务器安装的系统文件可能会被损坏或损毁.管理员一般可以通过系统自带的System File Checker (SFC) 或者更健壮 ...
- appium-手势密码实现-automationName 是Appium的情况
1. 红色区域的范围为:[66,575][1014,1523], 由于这块是一个整块,所以无法使用每个点的数据:因此只能使用LockPatternView对象拿到左上角的坐标值 2. 原理, 将九宫 ...
- 【非原创】tomcat 安装时出现 Failed to install Tomcat7 service
tomcat 安装时出现 Failed to install Tomcat7 service 今天在安装tomcat时提示 Failed to install Tomcat7 service了,花了大 ...
- Python全栈工程师(异常(高级)、运算符重载)
ParisGabriel 每天坚持手写 一天一篇 决定坚持几年 为了梦想为了信仰 开局一张图 Python人工智能从入门到精通 对象的属性管理函数: getattr ...
- crmsh语法
.查看配置信息 crm(live)# configure crm(live)configure# show node node1 node node2 property cib-bootstrap-o ...