-1
A
回答
2
1em的是用於頂部和底部邊緣
40像素爲左右邊距
1EM等於當前字體大小
它也可以被寫像
margin-top: 1em;
margin-right: 40px;
margin-bottom: 1em;
margin-left: 40px;
或類似
margin: 1em 40px 1em 40px;
甚至另一種方式,所以如果當前字體大小爲24像素,則保證金將是相同
margin: 24px 40px;
,但可以說,計算機用戶會放大他們的屏幕200%的再保證金將
margin: 48px 40px;
3
利潤率接受一到四個參數:
One single value applies to all four sides.
Two values apply first to top and bottom, the second one to left and right.
Three values apply first to top, second to left and right and third to bottom.
Four values apply to top, right, bottom and left in that order (clockwise).
,你可以在這裏閱讀詳細
0
據W3 Org,單位的定義, 「EM」 被定義爲
"The em is simply the font size. In an element with a 2in font, 1em thus means 2in. Expressing sizes, such as margins and paddings, in em means they are related to the font size, and if the user has a big font (e.g., on a big screen) or a small font (e.g., on a handheld device), the sizes will be in proportion. Declarations such as 'text-indent: 1.5em' and 'margin: 1em' are extremely common in CSS. "
而 「PX」 被定義爲:
"The px unit is the magic unit of CSS. It is not related to the current font and also not related to the absolute units. The px unit is defined to be small but visible, and such that a horizontal 1px wide line can be displayed with sharp edges (no anti-aliasing). What is sharp, small and visible depends on the device and the way it is used: do you hold it close to your eyes, like a mobile phone, at arms length, like a computer monitor, or somewhere in between, like a book? The px is thus not defined as a constant length, but as something that depends on the type of device and its typical use. "**strong text**
相關問題
- 1. 爲什麼10px + 10px = 10px?
- 2. CSS如何將高度爲2em的標題與底部對齊
- 3. 瞭解CSS分組/嵌套
- 4. 使用CSS輕推我的文字10px
- 5. 瞭解一些CSS
- 6. 如何瞭解什麼更改了我的css值?
- 7. 瞭解插值
- 8. 瞭解CSS「section.positioned」選擇器
- 9. CSS破解了Safari 5的
- 10. 瞭解在CSS樣式表
- 11. 瞭解層疊在CSS
- 12. 瞭解渲染封鎖CSS
- 13. 瞭解CSS浮動屬性
- 14. 瞭解css中的類
- 15. 瞭解css textarea偏移量
- 16. 瞭解CSS選擇器
- 17. 什麼意思字體大小:1em/2em?
- 18. 瞭解CSS變換屬性的麻煩
- 19. 瞭解freemarker插值
- 20. CSS:如何在圖像之間添加10px?
- 21. 如何從CSS的絕對高度去除10px
- 22. Bootstrap/CSS Div搞砸了CSS
- 23. 什麼是IE8不瞭解這個CSS?
- 24. CSS破解了Mac上的Safari
- 25. CSS - 瞭解兒童選擇器
- 26. 瞭解一些WP主題CSS代碼
- 27. 瞭解dijit css和風格的邏輯
- 28. 瞭解可信度的CSS屬性
- 29. 瞭解jQuery UI的CSS文件內容
- 30. CSS破解了多背景圖片
這取決於屬性。可以在CSS規範和草稿中的屬性定義中找到答案。 –