首页 > 解决方案 > 如何生成 CSS3 形状

问题描述

我的 Photoshop 图层中有一个形状,我正在附加该形状的图像。请您写下如何从 CSS3 生成它。

在此处输入图像描述

标签: htmlcssshapes

解决方案


您可以使用 css :after effect

<div class="shape"></div>

.shape {
width: 100px; height: 100px;
line-height: 100px;
background-color: #fc0;
display: inline-block;
margin-left: 50px;
position: relative;
z-index: 2;
text-decoration: none;}

.shape:after {
content: "";
width: 100px; height: 100px;
background-color: #fff;
position: absolute;
top: 0; right: -50px;
border-radius: 50%;
z-index: 3;}

推荐阅读