css样式中的固定大小标题

css样式中的固定大小标题,css,styles,Css,Styles,我写过这样的风格: 但是它在IE中不起作用 它出现在IE中,如下所示: 但我想在chrome中像这样: 干杯 标题的html: <div id="header"> <div id="logo"> <h7 align="center">Mohammad Mahmoodi</h7> <p>Department of Computer Engineering, Faculty of Engineerin

我写过这样的风格: 但是它在IE中不起作用

它出现在IE中,如下所示:

但我想在chrome中像这样:

干杯

标题的html:

<div id="header">
    <div id="logo">
        <h7 align="center">Mohammad Mahmoodi</h7>
        <p>Department of Computer Engineering, Faculty of Engineering, University of Isfahan</p>
    </div>
    <!-- end #logo -->
    <div id="menu">
        <ul>
            <li class="first"><a href="index.html">Home</a></li>
            <li><a href="Teaching.html">Teaching & Courses</a></li>
            <li><a href="cv.html">Curriculum Vitae</a></li>
            <li><a href="students.html">Students</a></li>
            <li><a href="RI.html">Research Interests</a></li>
            <li><a href="publications.html">Publications</a></li>
            <li><a href="other.html">attraction point</a></li>
            <li><a href="font.html">Font</a></li>
            <li><a href="farsi.html">Farsi</a></li>
        </ul>
    </div>
    <!-- end #menu -->
</div>

穆罕默德·马穆迪
<伊斯法罕大学工程学院计算机工程系< /P>

当您下载该字体时(因为我假设它不是标准字体),它可能是.TTF格式的,IE并不总是识别这些文件。请尝试将其转换为.EOT,并将其嵌入网站,以实现更现代版本的IE兼容性。
这通常只适用于IE,但我想如果chrome已经识别了它,那么你很可能就可以使用其他浏览器了

我同意!但是我的用户可以使用IE!你能在标题中加入HTML吗?另外,
body
选择器中的
font
属性不正确,您忘了引用'B Nazanin`如何在站点上嵌入字体?@font-face{font-family:您的字体;字体样式:普通;字体重量:700;src:url(yourfont.eot);而且很明显,你的主.htmlI文件夹中的字体混淆了!我已经将字体“forte.ttf”转换为“forte.eot”。但是不知道在哪里写这段代码?我提供的代码会放在你的.css文件中。但是你仍然需要像使用.ttf一样使用它,以确保其他浏览器也能识别它。
<div id="header">
    <div id="logo">
        <h7 align="center">Mohammad Mahmoodi</h7>
        <p>Department of Computer Engineering, Faculty of Engineering, University of Isfahan</p>
    </div>
    <!-- end #logo -->
    <div id="menu">
        <ul>
            <li class="first"><a href="index.html">Home</a></li>
            <li><a href="Teaching.html">Teaching & Courses</a></li>
            <li><a href="cv.html">Curriculum Vitae</a></li>
            <li><a href="students.html">Students</a></li>
            <li><a href="RI.html">Research Interests</a></li>
            <li><a href="publications.html">Publications</a></li>
            <li><a href="other.html">attraction point</a></li>
            <li><a href="font.html">Font</a></li>
            <li><a href="farsi.html">Farsi</a></li>
        </ul>
    </div>
    <!-- end #menu -->
</div>