小编fer*_*dof的帖子

CSS 圆形边框在边框和内容之间留下间隙

我想要带有圆形边框的选项卡,并且边框和内容之间有一个奇怪的间隙。谁能帮我摆脱它吗?

在此输入图像描述

沙盒链接:https://codesandbox.io/s/borders-on-tabs-95cwzp ?file=/index.html

body {
  font-family: sans-serif;
}

.container {
  display: flex;
  justify-content: center;
  zoom: 2; /* just to see it better */
}

ul {
  list-style: none;
  display: flex;
  display: flex;
  list-style: none;
  border: 1px solid #133275;
  border-radius: 16px;
  background-color: #9db4d6;
  overflow: hidden;

  /* To reset browser native styles  */
  margin: 0;
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
  padding-inline-start: 0;
}

li {
  padding: 6px 12px;
  font-size: 20px;
  border-radius: 16px;
}

li.active {
  background-color: #133275;
  color: …
Run Code Online (Sandbox Code Playgroud)

html css

5
推荐指数
1
解决办法
1736
查看次数

标签 统计

css ×1

html ×1