2015-02-09 69 views
0

工作,我有一個表,並在第i個增加了內嵌CSS的展示點,如果文字是bigger.Its工作在其他瀏覽器中細除了IE9Epllisis不是在IE

下面是我的代碼

<table class="table table-bordered table-condensed hardware-software-table"> 
          <tbody><tr style="background-color: #8A8A8D; color: #fff;"> 
           <th style="width: calc(100% - 10px);overflow: hidden;text-overflow: ellipsis; white-space: nowrap;">VendorName</th> 
           <th style="width: calc(100% - 200px);overflow: hidden;text-overflow: ellipsis; white-space: nowrap;">Account No</th> 
          </tr> 
          <tr> 
          <td>1</td> 
          <td>2</td> 

         </tbody></table> 

請看屏幕截圖enter image description here

+0

我不認爲這是一個編程問題。這實際上是一個關於如何使用工具的問題 - Eclipse。 – 2015-02-09 07:32:53

回答

0

你必須對你做一些改變html。爲了獲得更好的性能,您可以在內部使用span標籤,並且它可以正常工作並定義span標籤的寬度。

<table class="table table-bordered table-condensed hardware-software-table"> 
 
          <tbody><tr style="background-color: #8A8A8D; color: #fff;"> 
 
           <th><span style="width: 100px;overflow: hidden;text-overflow: ellipsis; white-space: nowrap; display:block;"">VendorName aASDASDASD</span></th> 
 
           <th ><span style="width: 100px;overflow: hidden;text-overflow: ellipsis; white-space: nowrap; display:block;"">Account Number</span></th> 
 
          </tr> 
 
          <tr> 
 
          <td>1</td> 
 
          <td>2</td> 
 

 
         </tbody></table>