I try to create a set of nav buttons that look like this
我try 了混合混合模式,但没有成功.有没有人对我应该如何做到这一点有什么建议? 到目前为止,我这样做了
.nav {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #b3b3b3;
}
.skills-btn {
font-family: Roboto, Arial, Helvetica, sans-serif;
font-size: 1.2rem;
font-weight: 600;
line-height: 1.6rem;
background-color: #000;
color: white;
text-decoration: none;
border-radius: 60px;
height: 45px;
display: inline-flex;
align-items: center;
overflow: hidden;
width: auto;
max-width: 45px;
-webkit-transition: max-width 0.5s;
transition: max-width 0.5s;
z-index: 9999;
margin: 0 2px;
}
.skills-btn:hover {
max-width: 300px;
}
.icon {
margin-right: 23px;
padding: 0px 12px;
display: flex;
align-items: center;
}
.text {
white-space: nowrap;
padding-right: 15px;
}
.skills {
position: fixed;
bottom: 10;
left: 20;
font-size: 3.8rem;
line-height: 1.8em;
font-family: Roboto, sans-serif;
font-weight: 600;
}
<div id="nav" class="nav">
<a href="#" class="skills-btn">
<span class="icon"></span>
<span class="text">App Skills </span>
</a>
<a href="#" class="skills-btn">
<span class="icon"></span>
<span class="text">Language Skills</span>
</a>
<a href="#" class="skills-btn">
<span class="icon"></span>
<span class="text">Fields of Experties</span>
</a>
<span class="skills">skills</span>
</div>