我真的与柔性显示器混淆,我希望有人可以提供帮助。使用柔性显示器对齐标题中的内容
我试图重新本站https://jsbin.com/vafexudini/edit?html,css
我需要在左边(部分-A),有的在中间(第-B)和一些一路右侧(一路一些内容部-C)。
section-a似乎是在正确的位置,但我无法获得中间和一路正确的内容。
.container-1 {
display: flex;
max-width: 100%;
background-color: #F7F7F7;
height: 60px;
border-top: 1px solid #C1C1C1;
border-bottom: 2px solid #C1C1C1;
}
/*section-a*/
.section-a {
flex: 1;
position: relative;
top: 20px;
}
.section-a span.file {
margin-right: 15px;
}
#image {
float: left;
margin-right: 10px;
position: relative;
bottom: 7px;
}
/*section-b*/
.section-b {
flex: 2;
position: relative;
top: 20px;
justify-content: center;
}
.section-b span {
border: 2px solid #C1C1C1;
padding: 7px;
margin-right: -7px;
justify-content: center;
}
.left-edge {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.right-edge {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
.section-b span:hover {
cursor: pointer;
background-color: #E8F2FF;
}
.section-b span:active {
background-color: #E8F2FF;
}
/*section-c*/
.section-c {
flex: 1;
position: relative;
top: 20px;
}
.section-c span {
margin-right: 5px;
}
span.highlight {
background-color: yellow;
padding: 7px;
}
<div class="container-1">
<div class=section-a>
<div id="image">
<image src="images/file-image.png" alt="file image"/>
</div>
<span class="file">File</span>
<span>Add Library</span>
</div>
<div class="section-b">
<span class="left-edge htmlToggle">HTML</span>
<span class="cssToggle">CSS</span>
<span class="jsToggle">JavaScript</span>
<span class="consoleToggle">Console</span>
<span class="right-edge outputToggle">Output</span>
</div>
<div class="section-c">
<span class="highlight">Login or Register</span>
<span>Blog</span>
<span>Help</span>
</div>
</div>
真棒!感谢:D – user8322222