html引用不了自定义字体,html5 – 自定义@ font-face不加载chrome(chrome自定义字体无法渲染)...

自定义@ font-face不加载chrome(chrome自定义字体无法渲染)使用CSS自定义字体

@font-face {

font-family:'gotham-rounded-medium';

src:url('fonts/gothumrounded_medium/gotham-rounded-medium.eot');

src:url('fonts/gothumrounded_medium/gotham-rounded-medium.eot?#iefix')format("embedded-opentype"),

url('fonts/gothumrounded_medium/gotham-rounded-medium.woff')format("woff"),

url('fonts/gothumrounded_medium/gotham-rounded-medium.ttf')format("truetype"),

url('fonts/gothumrounded_medium/gotham-rounded-medium.svg')format("svg");

font-weight:400;

font-style:normal

}

.custom_font{

font-family:'gotham-rounded-medium', arial, sans-serif;

}

wbY8W.jpg

仅在调整屏幕窗口大小时才会显示文本.

那么请问有什么可以解决这个问题吗?

@font-face是CSS3中的一个模块,它允许开发者自定义字体并将其嵌入到网页中。通过使用@font-face,你可以在网页中使用非Web安全字体,从而实现更多样化的字体效果。\[3\] @font-face的语法规则如下: @font-face { font-family: <YourWebFontName>; /* 自定义字体名称 */ src: <source> \[<format>\]\[, <source> \[<format>\]\]*; /* 自定义字体的存放路径、格式 */ \[font-weight: <weight>\]; /* 定义字体是否为粗体 */ \[font-style: <style>\]; /* 定义字体样式,如斜体 */ } 其中,font-family用于定义自定义字体的名称,src用于指定自定义字体的存放路径和格式,format参数主要用于帮助浏览器识别字体格式。font-weight用于定义字体是否为粗体,font-style用于定义字体样式,如斜体。\[2\] 通过使用@font-face,你可以在CSS中引用自定义字体,并在网页中应用这些字体,从而实现更丰富的字体效果。 #### 引用[.reference_title] - *1* [用 @font-face 实现自定义字体](https://blog.csdn.net/huangpb123/article/details/104231496)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [@font-face使用自定义字体](https://blog.csdn.net/weixin_50561836/article/details/114108305)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [css3中@font-face模块自定义字体](https://blog.csdn.net/anmi3721/article/details/101666350)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值