How do I responsively center text inside of a

前端 未结 3 475
被撕碎了的回忆
被撕碎了的回忆 2020-12-22 11:23

I have a

that contains three
s. In each of those
elements is a

element with

3条回答
  •  生来不讨喜
    2020-12-22 12:03

    You can make a div with a border-radius to 50%. After, you can use the flex display to center verticaly and horizontaly.

    html

    div {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
    }
    div div {
      display: inline-flex;
      flex-direction: column;
      width: 31%;
      margin: 1%;
      border-radius: 50%;
      border: 1px solid #999;
      align-items: center;
      justify-content: center;
    }
    div div span {
      text-align: center;
      color: #999;
    }
    Serbian100%
    Serbian50%
    Serbian25%

提交回复
热议问题