我有一個HTML頁面:http://www.newsryde.com/article/1127950打印HTML頁面對齊[解決]
我一直在使用中實現CSS樣式表:我的CSS的
<link href="/css/jm/v2/print.css" rel="stylesheet" type="text/css" media="print" />
部分說以下內容:
html,
body{
width:670px !important; /* based upon http://stackoverflow.com/questions/320357/ */
background:white;
margin:0 !important;
position:relative;
left:0;
}
但是當我去打印時,頁面並沒有將內容與左邊對齊。
我的問題是,如何將非模擬頁面對齊到左邊,使其看起來像模擬頁面?
當我進入DevTools並模擬打印樣式表時,一切都正確地移動到左側,那麼打印效果會很好。這裏有一些截圖,以幫助解釋:
不仿真第一打印預覽:
仿真,然後打印預覽:
SOLUTION
感謝羅蘭路的跳球關於轉換。我添加了以下到print.css
文件的頂部:
*,
*:after,
*:before{
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}
它工作正常,我在Chrome的Win 7 –
啊,我應該使用OSX具有的即時通訊。將更新的問題,謝謝檢查窗口 – haxxxton