2013-03-30 18 views
0

我試圖改變標題的背景顏色.... 其在桌面佈局中工作正常.... 但它不能在iphone中正常工作佈局。 ... 頭顏色不是在iPhone改變奠定了.... 提供以下背景顏色在iPhone佈局中不改變

http://jsfiddle.net/mzMjT/embedded/result/

<tr> 
      <th style=" 
    background-color: red; 
">First Name</th> 
      <th>Last Name</th> 
      <th>Job Title</th> 
      <th>Favorite Color</th> 
      <th>Wars or Trek?</th> 
      <th>Porn Name</th> 
      <th>Date of Birth</th> 
      <th>Dream Vacation City</th> 
      <th>GPA</th> 
      <th>Arbitrary Data</th> 
     </tr> 

th { 
background: #333; 
color: white; 
font-weight: bold; 
} 
+0

添加'!important',例如'color:#000!important;' – Omar

回答

2

我的代碼,你的風格沒有改變流動佈局的原因是因爲它是在小scr上隱藏th元素eens,並使用CSS Pseudo-elements替換標題。如果你想樣式的「頭」上的移動版本,使用這樣的:

td:before { 
    background: #333; 
    color: white; 
    font-weight: bold; 
} 

不幸的是,它會採取一些調整,以得到僞元素,使一致列,但是這應該讓你在正確的軌道上!