无谷歌字体的Bootstrap CSS [英] Bootstrap CSS without Google Fonts

查看:128
本文介绍了无谷歌字体的Bootstrap CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



连接到我的设备的计算机赢得了我的设备没有互联网连接,它会从我的设备上运行的服务器加载页面。



我使用Bootstrap.css的Bootswatch覆盖构建了页面因为那是我熟悉的图书馆。但是,由于浏览器尝试检索Google字体,但显然无法加载,因此我的页面加载会挂起。



是否有Bootstrap.css版本不使用Google Fonts,或者有什么方法可以覆盖它们?

解决方案

难道你不能简单地从定制bootswatch主题中移除第一行你下载了(假设你下载了css文件,就像这一个 http://bootswatch.com/flatly/bootstrap。 css )?

  @import url(https://fonts.googleapis.com/css?family=拉托:400,700,400italic); 

这应该使它回退到可以使用的字体。


I am writing a simple offline web app to configure a device (think similar to a wireless router setup page).

The computer that is connected to my device won't have an internet connection, it will be loading the page from a server running on my device.

I've built the page using a Bootswatch override of Bootstrap.css because that is a library I'm familiar with. However, my page load hangs because the browser tries to retrieve Google Fonts but obviously can't.

Is there a version of Bootstrap.css which does not use Google Fonts, or is there a way that I can override them?

解决方案

Can't you simply remove the first line from the custom bootswatch theme you downloaded (assuming you downloaded the css file, like this one http://bootswatch.com/flatly/bootstrap.css)?

@import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic");

This should make it fall back to a font that it can use.

这篇关于无谷歌字体的Bootstrap CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆