在補(bǔ)齊了Java后端的短板之后拼苍,我準(zhǔn)備補(bǔ)補(bǔ)前端的課锐锣。這篇文章可以作為我前端學(xué)習(xí)的過程記錄(打開機(jī))。
-
2016年6月26日:在codecademy上學(xué)習(xí)HTML && CSS課程汰蜘。
codecademy勛章若干 2016年6月29日:codeacdemy學(xué)習(xí)進(jìn)度:77%廓脆,準(zhǔn)備將免費(fèi)的課程學(xué)完之后,升級(jí)成收費(fèi)賬號(hào)捻脖,學(xué)習(xí)剩余的練習(xí)課程锐峭。
根據(jù)下面這段話中鼠,讓你完全掌握CSS盒模型(css box model)。As you can see, each box is made of layers. From the outermost to the innermost:
- The margin is the space around the element. The larger the margin, the more space between our element and the elements around it. We can adjust the margin to move our HTML elements closer to or farther from each other.
- The border is the edge of the element. It's what we've been making visible every time we set the border property.
- The padding is the spacing between the content and the border. We can adjust this value with CSS to move the border closer to or farther from the content.
- The content is the actual "stuff" in the box. If we're talking about a p
element, the "stuff" is the text of the paragraph.
You'll see abbreviations like TM, TB, andTP in the diagram. These stand for "top margin," "top border," and "top padding." As we'll see, we can adjust the top, right, left, and bottom padding, border, and margin individually.
css box model
clear elements:If you tell an element to clear: left, it will immediately move below any floating elements on the left side of the page; it can also clear elements on the right. If you tell it to clear: both, it will get out of the way of elements floating on the leftand right!
absolute position和static position有啥區(qū)別沿癞?
學(xué)習(xí)心得:The more you practice, the better you'll get.