从Dropbox导入字体

发布于 2025-02-06 19:03:27 字数 926 浏览 3 评论 0原文

我正在尝试使用Drobox托管的字体。

看来所有字体都存储在邮政编码中的Dropbox中,因为您可以看到Bellow

我的问题是:是否可以在托管这样的HTML页面字体中导入?如果可能的话,如何?

我尝试使用 @font-face和@import而没有成功

<!DOCTYPE html>
<html>
    <head>
        <title>Web Font Sample</title>
        <style type="text/css">
            @font-face {
            font-family: 'Cera-Pro-Medium';
                src:  url('https://www.dropbox.com/sh/g5xuhd#####x69r8/AAD#######EOa'),
            }
            
            .classname {
                font-family: 'Cera-Pro-Medium';
            }
        </style>
    </head>
    <body>
        <div class="classname">
            test
        </div>
    </body>
</html>

I am trying to use fonts hosted in drobox.

It seems that all fonts are stored in Dropbox in a zip as you can see bellow
enter image description here

My question is : Is it possible to import in an HTML page fonts hosted like that? and if it is possible how?

I tried using @font-face and @import without success

<!DOCTYPE html>
<html>
    <head>
        <title>Web Font Sample</title>
        <style type="text/css">
            @font-face {
            font-family: 'Cera-Pro-Medium';
                src:  url('https://www.dropbox.com/sh/g5xuhd#####x69r8/AAD#######EOa'),
            }
            
            .classname {
                font-family: 'Cera-Pro-Medium';
            }
        </style>
    </head>
    <body>
        <div class="classname">
            test
        </div>
    </body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

香橙ぽ 2025-02-13 19:03:27

作为一个迟到一年的人,是的;但不在zip文件中,只需制作一个文件夹并将这些文件放入文件夹中,然后只需复制链接并将主要域替换为dl.dropboxusercontent.com并忽略背面,然后就可以了,然后继续将链接粘贴到@font中-face src(别忘了为字体家庭命名字体)

as a guy that was late for a year, Yes; but not in zip file, just make a folder and put those files in the folder, then just copy link and replace the main domain to dl.dropboxusercontent.com and ignore the back, there you go, proceed to paste the link in @font-face src (don't forget to name your font for font-family)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文