<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] # 字體 ``` 1. font-style: italic; /*斜體*/ 2. font-weight:400;/* normal 、700 bold*/ 3. font-size 大小 4. font-family 字體樣式 ``` > 其他屬性 > 1. color 顏色 > 2. line-height 行高(設置文本在盒子中垂直居中) ## 案例1:字體樣式 ![](https://img.kancloud.cn/e4/14/e414f2c1ab3f9cf86aa4675856faeebc_981x285.png) # 文本 ``` 1. text-indent:2em; 2. text-align:left;center;right; 3. text-decoration:underline;line-through;overline;none; 4. text-transform:capitalize;uppercase;lowercase; ``` > 隱藏溢出文本屬性 ``` word-break: break-all; /*西文換行*/ word-break: keep-all; /*西文不換行*/ white-space: normal; /*中文換行*/ white-space: nowrap; /*中文不換行*//*裁剪必要條件1*/ overflow: hidden; /*裁剪必要條件2*/ text-overflow: ellipsis; /*裁剪*/ ``` ## 案例2:文本樣式 ![](https://img.kancloud.cn/8e/47/8e477636eb1fa92a798877925db0b3a2_697x439.png) > text-shadow ## 案例3:凹凸文字 ![](https://img.kancloud.cn/49/ca/49ca9ac3f65715615dec9b306740eea9_586x167.png) ``` text-shadow: 1px 1px 1px #000,-1px -1px 1px #fff; ``` ## box-shadow ## 案例4:盒子邊框及陰影 ![](https://img.kancloud.cn/1e/eb/1eeb0caadbe931cbaba8451f466325be_512x324.gif) [小米商城https://www.mi.com/](https://www.mi.com/) ![](https://img.kancloud.cn/62/8f/628ff71b99b600bb302026edaceb6350_781x471.png) # 盒子模型 ## 盒子模型及裝飾順序 ![](https://img.kancloud.cn/7a/0d/7a0d5acc141cca3af3acb9cd179b494a_567x310.png) ![](https://img.kancloud.cn/59/fd/59fd1fd11fc25cb67590cd71f4ef1580_413x275.png) # 邊框 ``` 1. border-width 2. border-style:dashed;double;solid;dotted; 3. border-color 4. border-image 5. border-radius ``` ## 案例5:邊框 ![](https://img.kancloud.cn/03/2b/032b520b9f432f7de5c5c3cbbf58cd14_333x328.png) ``` margin:像素;占父元素的比例; padding:像素;占父元素的比例; ``` ## 擴展:慎用內外邊距 ![](https://img.kancloud.cn/fc/12/fc12a20d903e7a2f1fabfea0e5eb8b01_429x217.png) > **優先**使用寬度(width)→內邊距(padding)→外邊距(margin) > 1. 寬度不會產生太大影響 > 2. 內邊距會計算到盒子大小中,需要計算加減計算 > 3. 外邊距需要考慮**邊框合并** > 其他屬性 # 背景 ``` 1. 背景色:background-color 2. 背景圖:background-image 3. 背景定位:background-position:center;bottom;(關鍵詞或像素) 4. 背景大小:background-size: cover;100% 100%;(關鍵詞或比例) 5. 背景重復方式:background-repeat: repeat;repeat-x;repeat-y;repeat;no-repeat; 6. 背景是否固定:background-attachment: fixed; ``` ![](https://img.kancloud.cn/eb/ca/ebca8c1ac9dd4ee102e34db1130a1ffe_511x314.png) ## 案例6:背景無重復固定 ![](https://img.kancloud.cn/89/4d/894d56c00f7f219a46e0e08db58918bc_623x429.gif) ## 案例7:百度搜索懸停效果 ``` background-position ``` ![](https://img.kancloud.cn/f0/77/f0771b8c1336159d7892cab70afe9f88_144x78.gif) ## 案例8:邊框合并 ~~~ border-collapse:collapse; ~~~ ![](https://img.kancloud.cn/af/ed/afedeb575b86343d3f4f5affe6082069_188x184.png) # 其他(選修) ## 案例9:列表項 > list-style-type ![](https://img.kancloud.cn/c2/d1/c2d1c287f2f77af9f34877e1dbabbae4_829x481.png) ![](https://img.kancloud.cn/ad/38/ad38c17de3411e76155a398a3bf8e89a_309x98.png) ![](https://img.kancloud.cn/7a/62/7a629cc2059beaecf8904b9f759ee7a0_380x253.png) ## 案例10:鼠標手勢 ![](https://img.kancloud.cn/ce/f0/cef00151c576f5c9fe65249de5a8fecb_352x90.gif) ## 試一試:變造百度鏈接 ![](https://img.kancloud.cn/4a/77/4a770099279b71a6548e332518ba9963_394x184.gif)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看