2015-06-22 56 views
0

我在html中添加樣式變化,並且令人驚訝的是它在FireFox中不起作用,但在IE中運行良好,可能出錯?簡單的樣式表在FireFox中不起作用(字體大小)

<html> 
    <head> 
     <style> 
      body, h1, h2, h3, h4{font-size=24px;} 
     </style> 
    </head> 
    <body> 
     <br> 
     <h3>From - 456 To - a7890: 26 mins - 20.6 km</h3> 
     <h4>Spot 1 To Spot B</h4> 
     <hr> 
     <br>heading towards east for 40 miles<hr> 
    </body> 
</html> 

回答

1

這是無效的CSS。取而代之的=使用:

<html> 
 
    <head> 
 
     <style> 
 
      body, h1, h2, h3, h4 {font-size:24px;} 
 
     </style> 
 
    </head> 
 
    <body> 
 
     <br> 
 
     <h3>From - 456 To - a7890: 26 mins - 20.6 km</h3> 
 
     <h4>Spot 1 To Spot B</h4> 
 
     <hr> 
 
     <br>heading towards east for 40 miles<hr> 
 
    </body> 
 
</html>

2

您不使用CSS中的等號。這是你想要的

<style> 
     body, h1, h2, h3, h4{font-size:24px;} 
    </style> 
相關問題