Flex / Grid layouts not working on button or fieldset elements

前端 未结 3 1008
孤街浪徒
孤街浪徒 2020-11-21 05:38

I\'m trying to center inner elements of a

3条回答
  •  醉酒成梦
    2020-11-21 06:05

    Starting Chrome 83, the button now works as inline-grid/grid/inline-flex/flex, you can see more about this new feature here

    Here is a snippet(for those using Chrome 83 and up)

    button {
      display: inline-flex;
      height: 2rem;
      align-items: flex-end;
      width: 4rem;
      -webkit-appearance: none;
      justify-content: flex-end;
    }
    
    
    

提交回复
热议问题