如何讓我的邊距和內邊距在firefox和Safari瀏覽器中正確顯示?一般來說,正確的破解是什麼?Firefox和Safari頁邊距
0
A
回答
2
您應該使用CSS重置,這會將所有元素重置爲默認值,因此會在所有瀏覽器(包括Internet Explorer)中顯示相同內容。
0
這裏是我做的方式,它消除並中和HTML元素的不一致的默認樣式。首先,我重新使用yui reset樣式表:
/* RESET
---------------------------
Yahoo Reset
version: 3.3.0
build: 3167
*/
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
,然後我用yahoo css基地申報樣式普通的HTML元素:
/* BASE
--------------------------------------
Yahoo Base
version: 3.3.0
build: 3167
*/
h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong{font-weight:bold; color:#333}abbr,acronym{border-bottom:1px dotted #000;cursor:help;}em{font-style:italic;}blockquote,ol,dl{margin:1em;}ol,dl{margin-left:2em;}ol li{list-style:decimal outside;}dl dd{margin-left:1em;}th{font-weight:bold;text-align:center;}caption{margin-bottom:.5em;text-align:center;}fieldset,table,pre{margin-bottom:1em;}
+0
生病了試試看。謝謝。 – WillingLearner
+0
我已重置我的CSS,但事情仍然關閉在我的元素1的Firefox。我現在需要專門做一個規則... 1套Safari瀏覽器的說明,另一套適用於Firefox。我如何爲這兩款瀏覽器做一筆利潤率保證金? – WillingLearner
相關問題
- 1. CSS邊距在Chrome和Safari中不起作用(適用於Firefox)
- 2. 雙邊框間距在Chrome和Safari
- 3. 在Safari中可移除的頂部邊距,但不是Firefox
- 4. 乳膠段落間距和頁邊距
- 5. 大頁邊距
- 6. UIViewController頁邊距
- 7. 火狐/ Safari瀏覽器/ IE上邊距,左邊距0
- 8. WPF Tab頁邊距
- 9. DOMPDF:間距和頁邊距與HTML頁面不匹配
- 10. Safari桌面定位(負邊距)
- 11. Safari和Chrome之間的字體大小和邊距差異
- 12. Java Swing - JPanel和GridLayout頁邊距/填充
- 13. 奇怪的填充/頁邊距顯示在Firefox /鉻
- 14. 頁邊距左側在Firefox中無法正常工作
- 15. 繼承的頁邊距在Firefox中顯示不正確
- 16. 在Firefox表格邊距不折疊
- 17. Firefox顯示負邊距不正確
- 18. Firefox上邊距0不起作用
- 19. Firefox爲版面添加邊距/填充
- 20. Bootstrap模式的頁邊距
- 21. Aspose.Word頁碼右邊距
- 22. 頁邊距改變pdflatex
- 23. TCPDF頁邊距問題
- 24. CSS頁腳邊距問題
- 25. 刪除matplotlib頁邊距
- 26. 頁邊距在PHPExcel 1.7.8 mPDF
- 27. CSS浮動頁腳邊距
- 28. Html頁邊距錯誤
- 29. 暫時覆蓋頁邊距
- 30. 如何刪除頁邊距
生病給它一個嘗試。謝謝。 – WillingLearner