Css Flex / Start end / выравнивание 3-х компонентов - PullRequest
0 голосов
/ 10 января 2020

Здравствуйте, мне нужна кнопка с 3 выравниваниями

, один значок слева, кнопка посередине и кнопка в конце div

    <Content>
        <Image src = { logo }  style = {{width:'50px'}}/>  
        <Button />    
        <Button />  
    </Content>

css:

export const wrapStyle = css`
    min-height: 55px;
    max-height: 55px;
    width:100%;  
    background: yellow;
    padding: 0 !important; `;

export const contentLogo = css`
    width:240px;
    height:100%;
    background-color: rgba(31,30,30,.12)!important;
    line-height: 52px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    align-items: center;
    position: relative;
    transition: all .3s; `;

вот так:

enter image description here

Полагаю, что лучший способ был бы с гибким концом начала и т. Д. c

Я пытался, но не смог

1 Ответ

1 голос
/ 10 января 2020

Вроде так

body {
  margin: 0;
}

#container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: purple;
  padding: 1rem;
}

.flex-item {
  color: #fff;
}
<div id="container">
  <div class="flex-item"> Item One </div>
  <div class="flex-item"> <h1>Item Two</h1> </div>
  <div class="flex-item"> Item Three </div>
</div>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...