Css 为什么字体样式没有';不能在外部样式表中工作?

Css 为什么字体样式没有';不能在外部样式表中工作?,css,Css,我正在定义和使用我的自定义字体。在内部样式表中,这很好,但在外部样式表中使用时,它不起作用。 这是我的代码: @font-face { font-family: A1Tahoma; src: url('Fonts/a1tahoma.eot') format('eot') , url('Fonts/a1tahoma.ttf') format('truetype') , url('Fonts/a1tahoma.woff') format('wof

我正在定义和使用我的自定义字体。在内部样式表中,这很好,但在外部样式表中使用时,它不起作用。
这是我的代码:

@font-face
 {
    font-family: A1Tahoma;
    src: url('Fonts/a1tahoma.eot') format('eot')
         , url('Fonts/a1tahoma.ttf') format('truetype')
         , url('Fonts/a1tahoma.woff') format('woff')
         , url('Fonts/a1tahoma.svg') format('svg'); 


   /* font-weight: normal;
    font-style: normal;*/
} 
  body,.test1 
{

 font-family:A1Tahoma; font-weight: bold;font-style: normal;

}  
<div class="test1">این خط را باید با نوع فونت تاهما ببینید<br />همچنین عدد 125420 به صورت فارسی تایپ شده است.</div>
@font-face
{
字体系列:A1Tahoma;
src:url('font/a1tahoma.eot')格式('eot')
,url('font/a1tahoma.ttf')格式('truetype')
,url('font/a1tahoma.woff')格式('woff')
,url('font/a1tahoma.svg')格式('svg');
/*字体大小:正常;
字体风格:普通*/
} 
正文,.test1
{
字体系列:A1Tahoma;字体大小:粗体;字体样式:普通;
}  
15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15سیتیپشدهتت。
你能帮我吗?

我怀疑这与样式表中的相对URL有关。外部样式表是否与html页面位于同一位置?url(“Fonts/…”中的路径必须从CSS的位置开始工作。例如,如果您具有以下结构:

index.html
Fonts/a1tahoma.eot
css/styles.css

然后您需要将URL更改为
src:URL('../Fonts/a1tahoma.eot')
在kar ghable font ye/bezar yani injori va URL ham bedon cot bezar中的salam,baraye

url(/Fonts/a1tahoma.eot) format('eot')
您可以将此样式用于加载字体

url(/Fonts/a1tahoma.eot) format('eot')
试试这个:

font-family: 'A1Tahoma';

可能是因为对于“”

它在所有浏览器中都不起作用?@Sirwanaffi是的,它在IE、Firefox、chorom中都不起作用……是的,我在相同的位置使用它们并测试您的答案,但它还不起作用!我在你的截图中没有看到样式表-它在哪里?@richard看着原始代码网页上的样式是内联的。我可以看到内联样式。因为我的答案是关于外部样式表的位置,这就是我所指的。项目布局的屏幕截图中未显示此内容。这是路径必须相对的。@Richard,样式的外部路径位于App_Themes文件夹/DefaultTheme/main.cssin rahi ke goftamo anjam bedin be javab miresin hamid jan中