小编Roh*_*ali的帖子

如何在tailwind css中使用before和after?

.card {
  position: relative;
  background-color: grey;
  display: block;
  width: 300px;
  min-height: 90px;
  cursor: pointer;
  padding: 15px;
  margin: calc(50vh - 30px) auto 0 auto;
}

.card::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -5px;
  width: calc(100% - 25px);
  height: calc(100% - 10px);
  border-top: 5px solid brown;
  border-left: 5px solid brown;
}

.card::after {
  content: '';
  position: absolute;
  top: -5px;
  right: 10px;
  height: 5px;
  width: 25px;
  background-color: orange;
}
Run Code Online (Sandbox Code Playgroud)
<div class="card">
</div>
Run Code Online (Sandbox Code Playgroud)

我无法理解如何使用顺风创建相同的东西

我尝试使用 tailwind 但它不起作用,我观看 youtube 视频并搜索如何在 tailwind 中使用 after …

css tailwind-css

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

css ×1

tailwind-css ×1