html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documenttitle>
<style>
div{
width: 150px;
height: 150px;
background-color: antiquewhite;
display: inline-block;
box-shadow: 0 14px 28px rgb(0 0 0 / 25%);
}
style>
head>
<body>
<div class="div1">div>
<div class="div2">div>
body>
html>
其实就是外边距+外阴影+内阴影啦。参考我的代码修改就好了如果颜色不明显你换一个就行了
margin-right: 4px; 右外边距,隔开两个盒子
box-shadow: 3px 3px 4px 4px #eee, inset -10px 0px 16px 0px rgba(238,238,238, 0.4); 第一个值调外阴影,逗号后第二个值调内右阴影
有个东西叫内阴影
两个div给个外边距