TreeviewCopyright © aleen42 all right reserved, powered by aleen42

CSS Back

-ms -moz -webkit

Attribute Description
-ms to represent IE's private attributes.
-moz to represent Firefox's private attributes.
-webkit to represent private attributes of Chrome and Safari.

background

  • background是一個複合屬性, 其下有background-image, background-color, background-position, background-attachmentbackground-repeat. 我們可以直接設置- - background, 也可以分別對其下屬性進行社設置.

    background:url(../pic/background.png);
    
    • background-image 设置背景图片

      background-image:url(../pic/background.png);
      
    • background-color 设置背景顏色

      background-color:#000;
      background-color:transparent;
      background-color:rgba(0, 0, 0, 0.8);
      

float

  • float用於浮動某個對象
  • 通常<div>是在標準流之中從上往下排列的, 若要使得某個<div>擺脫標准流, 則要把其設置為浮動.
  • 浮動特性:

    • 若A元素設置了浮動, 而A前面的元素在標準流中, 那麼這兩個元素將保持垂直排列.
    • 若A元素設置了浮動, 而A前面的元素也設置了浮動, 則這兩個元素將並行排列.
    • 若兩元素都設置了浮動, 且想要保持垂直排列, 則可設置後一元素即A:

      clear: left;    /* 強迫A元素左邊不能出現浮動 */
      
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.