div 里的内容让其超过一定长度自动换行排列
<div class="more-disk">
<a href="/onedrive/">node12-od</a>
<a href="/asia/">self-node</a>
<a href="/old-cn/">old-cn</a>
<a href="/newbuytest/">newbuytest</a>
</div>
放出以上 more-disk 的 css 代码
.more-disk {
margin: 0;
border: 0 none;
padding: 30px 30px;
text-align: left;
font-weight: 400;
color: #000;
background-color: rgba(245,245,245,0.5);
white-space: nowrap; // 默认不让换行,注释掉
overflow: auto; //自动溢出也就是横向拖动栏,注释掉
}
对以上样式加上 word-wrap: break-word; :
.more-disk {
margin: 0;
border: 0 none;
padding: 30px 30px;
text-align: left;
font-weight: 400;
color: #000;
background-color: rgba(245,245,245,0.5);
word-wrap: break-word;
}
旗下的 a 标签需要加上
.more-disk a {
margin: 5px 10px;
padding: 5px;
transition-duration: 0.4s;
border-radius: 12px;
background-color: white;
color: black;
border: 2px solid rgba(85,85,85,0.7);
height: 20px;
display: inline-block; //加上这个
}