html - 字体/文本在 iOS 设备上显得模糊 (HTML/CSS)

标签 html ios css text blurry

我正在测试我的网站并注意到在 iOS 设备上导航(滑动导航)和页脚文本是模糊的。

这不会发生在其他任何地方,也不会出现在任何其他浏览器/平台上。

我用过 -webkit-font-smoothing: antialiased;但没有解决这个问题的运气。

CSS:

#nav {
    a {
        display: block;
        padding: 20px 25px 22px;
        position: relative;
        -webkit-font-smoothing: antialiased;

        h1 {
            @include font-size(13);
            color: #747678;
            font-weight: 700;
            margin: 0 0 10px 0;
            padding: 0px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        h2 {
            @include font-size(18);
            line-height: 24px;
            margin: 0;
            padding: 0;
            color: #0072ac;
            font-weight: normal;
        }

        h3 {
            @include font-size(14);
            margin: 8px 0 0;
            padding-right: 20px;
            color: #0072ac;
            font-weight: 300;
        }

        &:hover {
            .supports-no-touch & {
                background-color: #007dba;
                h1, h2 {
                    color: #FFF;
                    font-weight: 500;
                }
                h3{
                    color: #d5e9f3;
                }
            }
        }
    }
}

HTML(带 ruby )

这是渲染到列表中的内容

<script type="text/html" id="tpl-nav-item">
    <a href="{{path}}">
        <h1>{{categoryLabel}}</h1>
        <h2 class="title">{{title}}</h2>
    </a>
</script>

提前致谢。

斯科特

最佳答案

强制浏览器重新绘制使用:-webkit-transform: translate3d(0,0,0);

希望这对其他人有帮助。

关于html - 字体/文本在 iOS 设备上显得模糊 (HTML/CSS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25277992/

相关文章:

html - 如何根据浏览器加载css?

javascript - 将 Javascript/Html/PHP 显示为文本

javascript - HTML 5 Canvas - 旋转、缩放、平移和绘制图像

ios - Swift:奇怪的 XCode 行为在 NSArray 的子类中具有必需的初始化程序

javascript - 如何从静态导航栏转到位置 :fixed without screwing everything?

html - p 标签悬停显示隐藏文本将改变下一个元素的位置

ios - 具有相等宽度和设置优先级的自动布局

ios - 使用 CloudKit 保存记录时没有这样的文件或目录

html - 使 Bootstrap 列流畅,(自动可调)现在它们堆叠在小屏幕上

html - 如何使用 CSS3 为第一个字母制作动画