html/css 重點筆記
kidneyweakx
March 13, 2019 (Updated: December 18, 2025)
# 學習筆記
margin 與 padding 的差異
位置是他們最大的差異
margin 是外邊距,有負值,別稱 填充
padding 是內邊距,別稱 空白邊
甚麼是 box model
框模型(box model)是包含border(邊框)、margin(外邊距)、padding(內邊距)和處理元素內容的處理方式。
為何要使用 em 而非 px 來定義字的大小
為了在internet explorer調整文本大小
em可以在所有瀏覽器更改文字大小,px在部分瀏覽器不行
px是用來調邊距的單位
h1 {margin : 10px 0px 15px 5px;} 的margin-top、margin-right、margin-left、margin-bottom 各是多少?
造順時鐘順序排列
top 10px
right 0px
bottom 15px
left 5px
# extra
如果缺少左外邊距的值,則使用右外邊距的值。
如果缺少下外邊距的值,則使用上外邊距的值。
如果缺少右外邊距的值,則使用上外邊距的值。
Related Articles
No File is an Island: Unraveling Swift Dependencies and Architecture
> > In the world of Swift, we are accustomed to the power of Xcode and clean syntax. However, as a project's scale grows, an invisible monster begins to haunt the...
Saved by the Logs: How to Recover a Forgotten Keystore Password via IDE Build Logs.
> > The greatest distance in the world is when the password is right in the IDE, but I can't see it
Hexo升級V5排除疑難雜症
> 因為剛好把電腦重灌,然後這個blog就躺在D槽等著我幫他換新的環境,然後他就被我快樂的升級了。