css picture edge shadow effect

1. Why add shadow:

In order to display the picture when we monotonous usually add a shadow effect to display beautiful
main utility of the box-shadow: Properties Properties Introduction

Below we show the effect

2. Code example:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>图片按钮实验</title>
		<style type="text/css">
         img{
			 border-radius: 5px;
			 margin-top: 40px;
			 margin-left: 300px;
			 width: 700px;
			 height: 400px;
			 box-shadow:0 5px 20px rgba(0,0,0,0.5)
		 }
		</style>
	</head>
	<body>
		<img src="https://i.loli.net/2020/04/11/6ZfB4y5oVpWHC9N.png">
	</body>
</html>

Guess you like

Origin www.cnblogs.com/yaoliuyang/p/12678831.html