我可以在HTML和CSS中实现它?
我尝试了夹具掩码,但它并没有像我所显示的那样给出整个东西。我还尝试直接添加图像,并以绝对方式添加文本,但在1200px以下的小屏幕上打破了设计。任何帮助将不胜感激。
这里是附件的代码,它给出了上半年,我只想知道如何实现所有四个。
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f5f5;
}
.union-shape {
width: 800px;
height: 300px;
background: linear-gradient(to bottom, #e8ebfa, #c2c6f1);
clip-path: path("M 0,50 A 50,50 0 0 1 50,0 H 450 A 50,50 0 0 1 500,50 V 120 A 50,50 0 0 0 550,170 H 850 A 50,50 0 0 1 900,220 V 250 A 50,50 0 0 1 850,300 H 50 A 50,50 0 0 1 0,250 Z");
position: relative;
}
/* Optional Grid Overlay */
.union-shape::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
background-size: 40px 40px;
top: 0;
left: 0;
}
<body>
<div class="union-shape"></div>
</body>
。