1. 程式人生 > >圖片變亮效果--濾鏡

圖片變亮效果--濾鏡

<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>圖片變亮效果--濾鏡</title>
	<style>
		.div{
			width: 200px;
		}
		.div:hover img{
			-webkit-filter: grayscale(0); 
			-moz-filter: grayscale(0); 
			-ms-filter: grayscale(0); 
			-o-filter: grayscale(0);
			filter:url("about:blank");
			filter: grayscale(0); filter: rgb; 
		}

		.div img{
			width: 100%;
			-moz-filter: grayscale(100%);
			-ms-filter: grayscale(100%);
			-o-filter: grayscale(100%)
			;filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
			-webkit-filter: grayscale(1);
		}
	</style>
</head>
<body>
	<div class="div">
		<img src="https://cs.m.xczhihui.com/xcview/images/geren.jpg" alt="" />
	</div>
	<div class="div">
		<img src="https://cs.m.xczhihui.com/xcview/images/geren.jpg" alt="" />
	</div>
	<div class="div">
		<img src="https://cs.m.xczhihui.com/xcview/images/geren.jpg" alt="" />
	</div>
</body>
</html>

在這裡插入圖片描述