页面加载时元素移动并回到正确位置

时间:2021-03-04 17:26:01

标签: html css

我的页面中有一些元素会在页面加载时移动..

像这样:

.letterBar {
    font-family: 'Open Sans', sans-serif;
    height: 45px;
    background-color: #212121;
    text-align:center;
    font-size:0;
    font-weight: lighter;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding-left: 0.6px;
    width: 1182px;
}

.letterBar a {
    display:inline-block;
    padding: 9.4px 16.8px;
    margin: 2px 0px;
    font-size: 15px;
    text-decoration: none;
    color: #d0d0d0;
    background: #191919;
    width: 
}

加载时: While Loading

页面加载时: enter image description here

我知道字母正在向下移动并返回到正确的位置,因为加载时 letterBar 的宽度也在移动,但是我该如何解决??

0 个答案:

没有答案
相关问题