您的位置:首页 > 教程笔记 > 前端笔记

css多重边框代码实例

2023-12-04 13:41:04 前端笔记 134

分享一段代码实例,它实现了多重边框效果。

代码实例:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="/" />
<title>实例</title>
<style type="text/css">
.box {
  width: 200px;
  height: 200px;
  float: left;
  padding: 10px;
  margin: 10px 20px;
  color: #333;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
}
.shadow {
  background: #ccc;
  box-shadow: 0 0 0 10px #655, 
    0 0 0 15px deeppink, 
    0 2px 5px 15px rgba(0, 0, 0, .6);
}
</style>
</head>
<body>
<div class="box shadow">多重边框</div>
</body>
</html>

 

相关推荐