相关疑难解决方法(0)

Flexbox没有给予元素相同的宽度

尝试最多包含5个项目且少至3个的flexbox导航,但它并未在所有元素之间平均分配宽度.

小提琴

我正在建模的教程是http://www.sitepoint.com/responsive-fluid-width-variable-item-navigation-css/

上海社会科学院

* {
  font-size: 16px;
}

.tabs {
  max-width: 1010px;
  width: 100%;
  height: 5rem;
  border-bottom: solid 1px grey;
  margin: 0 0 0 6.5rem;
  display: table;
  table-layout: fixed;
}
.tabs ul {
  margin: 0;
  display: flex;
  flex-direction: row;
}
.tabs ul li {
  flex-grow: 1;
  list-style: none;
  text-align: center;
  font-size: 1.313rem;
  background: blue;
  color: white;
  height: inherit;
  left: auto;
  vertical-align: top;
  text-align: left;
  padding: 20px 20px 20px 70px;
  border-top-left-radius: 20px;
  border: solid 1px blue;
  cursor: pointer;
} …
Run Code Online (Sandbox Code Playgroud)

html css html5 css3 flexbox

321
推荐指数
4
解决办法
21万
查看次数

标签 统计

css ×1

css3 ×1

flexbox ×1

html ×1

html5 ×1