filter: none | invert() | drop-shadow() | brightness() | saturate() | blur() | hue-rotate() | contrast() | opacity() | grayscale() | sepia() | url();
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: brightness(130%);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2>brightness(130%)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: blur(2px);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2>blur(2px)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: invert(60);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2>invert(60)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: saturate(40);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2>saturate(40)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: drop-shadow(10px 20px 30px yellow);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2> drop-shadow(10px 20px 30px yellow);</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: contrast(50%);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2> contrast(50%)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: opacity(40%);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2> opacity(40%)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: hue-rotate(240deg);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2> hue-rotate(240deg)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: grayscale(80%);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2> grayscale(80%)</h2>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS filter属性</title>
<style>
body{
text-align:center;
}
#img1 {
filter: sepia(90%);
}
</style>
</head>
<body>
<img src="../uploads/html/rose.jpg" > <h2>原图像 </h2>
<img src="../uploads/html/rose.jpg" id="img1"> <h2> sepia(90%)</h2>
</body>
</html>