首页 > 解决方案 > 页面加载时元素移动并返回正确位置

问题描述

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

像这个:

.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: 
}

加载时: 加载时

页面加载时: 在此处输入图像描述

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

标签: htmlcss

解决方案


推荐阅读