2016-05-11 63 views
-7

我正在使用无序列表和脚本MT Bold此页上的字体。现在有两个问题:无序列表和字体在不同浏览器中显示不同

  1. 无序列表在Chrome和Opera正确显示,但无法在Internet   Explorer和Firefox,也就是说,它不显示显示和隐藏效果,所有的内容都默认情况下可见。
  2. 字体在Firefox和Internet   Explorer中正确显示,但不在Chrome和Opera中显示。 我正在使用所有浏览器的最新版本。这里是我的代码:

article p { 
 
      color: green; 
 
      font-size: 15px; 
 
      font-family: arial; 
 
      width: 880px; 
 
     } 
 

 
body { 
 
      margin:0px auto; 
 
    text-align:left; 
 
} 
 
#mainDivContainer{ 
 
    position: relative; 
 
    margin-top: 0px; 
 
    margin-bottom: 0px; 
 
} 
 

 
#insideMainDivContainer{ 
 
    width: 1050px; 
 
    margin-top: 5px; 
 
    margin-left: 120px; 
 
    margin-right:auto; 
 
    background-color:white; 
 
    border:1px solid black; 
 
} 
 
     details { 
 
      color: green; 
 
      font-family: Script MT Bold; 
 
      font-size: 20px; 
 
     } 
 
     h1 { 
 
      margin-top: 30px; 
 
      font-family: Script MT Bold; 
 
      color: green; 
 
      font-size: 30px; 
 
      } 
 

 
     details ul { 
 
      color: green; 
 
      font-size: 15px; 
 
     } 
 
      .auto-style1 { 
 
      color: green; 
 
      font-style: italic; 
 
      text-align: justify; 
 

 
     } 
 

 
     .auto-style2:hover{ 
 
      -ms-transform: scale(1.1,1.1); 
 
      transform: scale(1.1,1.1); 
 
      -webkit-transform: scale(1.1,1.1); 
 
      -ms-transform: scale(1.1,1.1); 
 

 
     } 
 

 
     .auto-style3:hover{ 
 
      font-weight: bold; 
 
     } 
 

 
    #links{ 
 
    width: 950px; 
 
    height: 170px; 
 
    position: relative; 
 
    margin:25px; 
 
    margin-left: 30px; 
 
    padding: 0px; 
 
    overflow: hidden; 
 
} 
 
#catchline{ 
 
    width:500px; 
 
    height:20px; 
 
    float:left; 
 
    text-align:center; 
 
} 
 

 
#textHolder{ 
 
    float:left; 
 
    width: 950px; 
 
    height: 300px; 
 
    word-spacing: 1px; 
 
    padding-left:10px; 
 
    padding-top: 20px; 
 
    text-align:left; 
 
    margin-top: 30px 
 
} 
 
special{ 
 
    font-family: Script MT Bold; 
 
    list-style-type: none; 
 
    font-size: 25px; 
 
    font-style: italic; 
 
    font-weight: bold; 
 
    color: chocolate; 
 
    margin-top: 10px 
 
}
<html> 
 
    <body> 
 
<div id="mainDivContainer"> 
 
    <div id="insideMainDivContainer"> 
 

 
<div id="catchline"> 
 
<span class="auto-style1"><b>We make your experience a special one!</b></span> 
 
</div> 
 

 
<div id="textHolder"> 
 
    <article> 
 
     <div class="auto-style1"><p class="auto-style3"> 
 
     FoodHub is an American chain of restaurants that enables food lovers to come together and 
 
     enjoy food. It provides online delivery of food items, 24*7. At FoodHub, you will have 
 
     some of city's best destination cafes, bistros, restaurants, fast food and others under one roof. 
 
</p></div> 
 

 
<div class="auto-style1"><p class="auto-style3"> 
 
     FoodHub provides its customer a healthy combination of surreal surroundings in addition to 
 
     tongue tickling food of different cuisine. FoodHub is not only the best choice for 
 
     traditional food for any hour of day, but also a good place for children to have fun. 
 
     We provide entertaining facilities, such as puppet shows, for children. 
 
</p></div> 
 
    </article> 
 

 
<details> 
 
     <summary><b> Cuisines we offer:</b></summary> 
 
       <ul> 
 
        <li>American</li> 
 
        <li>Spanish</li> 
 
      <li>Mexican</li> 
 
      <li>Indian</li> 
 
      <li>Chinese</li> 
 
      <li>Mughlai</li> 
 
      <li>Portuguese</li> 
 
      <li>Vietnamese</li> 
 
      <li>Italian</li> 
 
        <li id="special">We also provide bakery products.....</li> 
 
       </ul> 
 
</details> 
 
<h1><I> 
 
Come with your family or friends to cater brilliant tastes! </I></h1> 
 
</div> 
 

 
</div> 
 
</div> 
 
</body> 
 
    </html>

我尽我所能去解决它,但没有什么。

回答

3

<details>元素不是目前(2016年5月11日)由IE支撑,并且是在Firefox实验性功能需要的偏好“标志”被设置/使能。

Per MDN

此功能,因为火狐47 dom.details_element.enabled偏好背后可用,默认为false,除了在夜间和Aurora版本(错误1241750)。对它的支持是默认启用的,即偏好默认设置为true,因为火狐49.0(错误1226455)。

关于字体问题(请不要一次询问多个问题)我相信其他答案是正确的......使用引号。

3

关于字体:尝试将“arial”更改为“Arial”,并将“Script MT Bold”放在引号中以表明这是一个字体。 ('Script MT Bold'

你是什么意思的“显示和隐藏”效应的名单?有没有任何JS应该在悬停上做些什么?

+0

名单应该像一个下拉上单击菜单。你可以在“Run Code Snippet”选项中看到它。 –

+0

@GauravMahindra哪个代码应该触发它? – Johannes

+0

也许摘要标签或ul标签。我复制粘贴它。无论如何,字体引用的东西不起作用。同样的结果 –

相关问题