Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 国产99精品一区二区三区免费,一区二区视频免费看,国产人妖在线视频

          整合營銷服務商

          電腦端+手機端+微信端=數據同步管理

          免費咨詢熱線:

          CSS基礎-行和段落常用屬性

          CSS基礎-行和段落常用屬性

          紹三個和行相關的屬性。

          line-height

          定義行高,即行的高度,數值單位用px、字號倍數、百分比表示。

          <!--方式一 屬性單位 為px-->
          <style>
            p {
              line-height:30px
            }
          </style>
          
          
          <!--方式二 不帶單位,表示字號的倍數-->
          <style>
            p {
              line-height: 1.5
            }
          </style>
          
          
          <!--方式三 百分號, 表示 原字號的百分比(倍數)-->
          <style>
            p {
              line-height: 150%
            }
          </style>


          垂直居中

          有一種垂直居中的方式就是用行高等于盒子高。

          <!DOCTYPE html>
          <html lang="en">
          <head>
              <meta charset="UTF-8">
              <meta http-equiv="X-UA-Compatible" content="IE=edge">
              <meta name="viewport" content="width=device-width, initial-scale=1.0">
              <title>這是標題</title>
          
          
                  <style>
                  
                      .box {
                          height: 300px;
                          width: 300px;
                          background-color: red;
                          line-height: 300px;
                      }
          </style>
          </head>
          <body>
          
          
              <div class="box">
                  <p>文字</p>
                  
              </div>
          
          
              
          </body>
          </html>


          text-align

          文本的水平對齊方式

          意思

          left

          左對齊

          right

          右對齊

          center

          水平居中


          <style>
            p {
              width: 1100px;
            }
          
          
            .aleft {
              text-align: left;
            }
          
          
            .aright {
              text-align: right;
            }
          
          
            .acenter {
              text-align: center;
            }
          </style>
          
          
          <body>
            <p class="aleft">左端對齊</p>
            <p class="aright">右端對齊</p>
            <!-- 開發過程中通常可以用text-align實現水平居中-->
            <p class="acenter">水平居中</p>
          </body>


          一個實現垂直和水平居中的例子

          垂直方向:行高等于盒子高。

          水平方向:文字的text-align屬性為center。

          <!--文字垂直和水平都居中-->
          <!DOCTYPE html>
          <html lang="en">
          <head>
              <meta charset="UTF-8">
              <meta http-equiv="X-UA-Compatible" content="IE=edge">
              <meta name="viewport" content="width=device-width, initial-scale=1.0">
              <title>這是標題</title>
          
          
                  <style>
                  
                      .box {
                          height: 300px;
                          width: 300px;
                          background-color: red;
                          line-height: 300px;
                          text-align: center;
                      }
          </style>
          </head>
          <body>
          
          
              <div class="box">
                  <p>文字</p>
                  
              </div>
          </body>
          </html>


          text-indent

          文本和內容的縮進量。

          梯機動態效果圖

          程序員總是會在無聊的時候做出一些讓我們覺得腦洞大開的效果,這次就用了430純css代碼做了一個小球彈跳上樓梯這樣的效果,而且不加任何javascript代碼,下面我們一起來看一下效果的源碼吧。

          小球彈跳上樓梯源碼:

          因為代碼高達500行全部發出感官效果不理想,只能截取部分源碼用于文章分享。

          代碼過長有需要文檔版源碼的可以加群589651705獲取,已上傳群文件

          需要更多的web前端企業級特效,學習方法,敬請關注本頭條號!


          主站蜘蛛池模板: 国精产品999一区二区三区有限| 国产精品美女一区二区三区| 亚洲日韩中文字幕一区| 无码国产精品一区二区免费虚拟VR | 国产主播一区二区| 国产精品视频一区国模私拍| 亚洲国产精品综合一区在线| 国内偷窥一区二区三区视频| а天堂中文最新一区二区三区| 国产成人亚洲综合一区| 无码国产精品一区二区免费3p | 无码中文字幕乱码一区| 亚洲AV无码一区二区二三区入口| 一区二区三区观看| 亚洲A∨精品一区二区三区| 免费无码一区二区三区蜜桃大| 竹菊影视欧美日韩一区二区三区四区五区 | 精品人妻中文av一区二区三区| 一区二区视频传媒有限公司| 亚洲第一区精品观看| 精品乱码一区二区三区在线| 精品亚洲av无码一区二区柚蜜| 亚洲欧美日韩一区二区三区| 精品福利一区二区三区免费视频| 日韩一区二区在线观看视频| 久久人妻内射无码一区三区| 亚洲av综合av一区| 亚洲精品一区二区三区四区乱码| 无码欧精品亚洲日韩一区| 91在线视频一区| 在线一区二区观看| 日本在线视频一区| 91久久精一区二区三区大全| 国产一区二区视频在线观看| 免费无码一区二区三区蜜桃| 日韩在线不卡免费视频一区| 久久精品无码一区二区三区不卡| 在线观看精品视频一区二区三区| 无码人妻一区二区三区免费视频 | 国产精品综合一区二区三区| 日韩久久精品一区二区三区|