我们用的第一个滤镜是sepia(),他会给图片增加一整降饱和度的橙色染色效果

原图

添加sepia滤镜的效果

 img{
width:100%;
transition: .5s filter;
filter:sepia(2);
}
img:hover{
filter:none;
}

给色度添加饱和度可以用saturate()

filter: saturate(4);

两个同时添加的效果

filter:sepia(2) saturate(4);

如果不希望把图片调成橙黄色调也可以添加hue-rotate滤镜,变成稍深的亮粉色,大约295度

filter:sepia(1) saturate(4) hue-rotate(295deg);

还有一种毛玻璃的效果如下

html

<div class="box">
<p class='p'> An international forum for the world's major
bay areas launched a new cooperation platform over
the weekend to exchange resources and development
ideas, with bay areas in China and the United States
also standing to benefit.
</p>
</div>

css

.box {
margin: 0 auto;
width: 500px;
height: 300px;
color: #fff;
background: url('../assets/pic.jpg') 0 / cover;
display: flex;
justify-content: center;
align-items: center;
}
.p{
position:relative;
padding: 15px;
background:hsla(0 ,0% ,100%,.3);
width: 350px;
font-size:1.2em;
overflow:hidden;
z-index:; }
.p::before{
content:'';
z-index:-1;
position:absolute;
top:;left:;right:;bottom:;
filter:blur(20px);
margin:-10px;
background: url('../assets/pic.jpg') 0 / cover;
}

效果图

css 给图片添加滤镜效果,透明层毛玻璃效果的更多相关文章

  1. 小tip: 使用CSS将图片转换成模糊(毛玻璃)效果

    去年盛夏之时,曾写过“小tip: 使用CSS将图片转换成黑白”一文,本文的模式以及内容其实走得是类似路线.CSS3 → SVG → IE filter → canvas. 前段时间,iOS7不是瓜未熟 ...

  2. [转] 小tip: 使用CSS将图片转换成模糊(毛玻璃)效果 ---张鑫旭

    by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=3804 去年盛夏之时, ...

  3. 使用CSS为图片添加边框的几种方法

    css的应用十分广泛,即便用在图片的效果中也是方法多样,本文下面就介绍五种为图片添加特殊效果边框的CSS写法阴影效果 通过使用带有一些padding之的背景图来添加阴影效果. HTML <img ...

  4. 使用CSS为图片添加更多趣味的5种方法

    使用Photoshop为每个图片添加某种样式虽然可行,但会是相当乏味且困难的长久工作.下面要介绍的CSS技巧将帮助你从痛苦中解脱出来! 阴影效果 通过使用带有一些padding之的背景图来添加阴影效果 ...

  5. Swift - 给图片添加滤镜效果(棕褐色老照片滤镜,黑白滤镜)

    Core Image是一个强大的滤镜处理框架.它除了可以直接给图片添加各种内置滤镜,还能精确地修改鲜艳程度, 色泽, 曝光等,下面通过两个样例演示如何给UIImage添加滤镜. 1,棕褐色滤镜  -  ...

  6. css3为图片添加鼠标移入放大效果

    只需要为添加效果的图片定义一个伪类 img.zoom-img:hover { -webkit-transform: scale(1.15); -webkit-transition-timing-fun ...

  7. CSS 背景图片 添加 重复和定位。

    <!doctype html><html lang="en"> <head> <meta charset="UTF-8" ...

  8. CSS背景图片垂直居中center不起效果完美解决

    背景图片居中CSS如下 background:#4892fe url("<%=basePath%>/img/login_bg.jpg") no-repeat cente ...

  9. css中图片有缩放和转动效果

    现在html中利用div来包裹住一张图片. <div class="xuanzhuan"> <img src="images/top.png" ...

随机推荐

  1. 跨域篇--JSONP原理

    一篇文章让你明白 jsonp原理详解 什么是JSONP? 先说说JSONP是怎么产生的: 其实网上关于JSONP的讲解有很多,但却千篇一律,而且云里雾里,对于很多刚接触的人来讲理解起来有些困难,着用自 ...

  2. 14-python基础—python3中的defaultdict()

    1.collections.defaultdict 类 from collections import defaultdict 2.collections.defaultdict 类与工厂函数dict ...

  3. rookit入門

    来源:rootkit_com 作者:Clandestiny 翻译:fqh “Help!我是一名新手!我需要一款rootkit入侵朋友的机器…我想编写自己的rootkit…我想开始开发代码… 该从哪里入 ...

  4. android中的ContentProvider实现数据共享

    为了在应用程序之间交换数据,android中提供了ContentProvider,ContentProvider是不同应用程序之间进行数据交换的标准API.当一个应用程序需要把自己的数据暴露给其他程序 ...

  5. spring基于注解的事务控制

    pom配置: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http ...

  6. 前端学习(十)初识js(笔记)

    js事件(公有属性) onclick=""  当点击...时! onmouseover="" 当鼠标移入...时!onmouseout="" ...

  7. Android蓝牙自动配对Demo,亲测好使!!!(转)

    蓝牙自动配对,即搜索到其它蓝牙设备之后直接进行配对,不需要弹出配对确认框或者密钥输入框. 转载请注明出处http://blog.csdn.net/qq_25827845/article/details ...

  8. thinkphp 配置参考

    惯例配置 应用设定 'APP_USE_NAMESPACE' => true, // 应用类库是否使用命名空间 3.2.1新增 'APP_SUB_DOMAIN_DEPLOY' => fals ...

  9. json格式化在线工具推荐

    现在系统对接基本都采用json格式的报文,杂乱无章的json让人看起来头大,这里推荐一款在线格式化json的工具, 工具地址: http://www.matools.com/json 这个在线Json ...

  10. Golang flag包使用详解(一)

    概述 flag包提供了一系列解析命令行参数的功能接口 命令行语法 命令行语法主要有以下几种形式 -flag //只支持bool类型 -flag=x -flag x //只支持非bool类型 以上语法对 ...