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 国产免费资源,毛片网站在线播放,中文字幕在线视频一区

          整合營銷服務商

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

          免費咨詢熱線:

          JavaScript,ES6,箭頭函數,允許使用「箭頭」(=>)定義函數

          頭函數(Arrow Function)

          ES6標準新增了一種新的函數:Arrow Function(箭頭函數),使用箭頭(=>)定義函數。

          其特點是:1、如果形參只有一個,則小括號可以省略;2、函數體如果只有一條語句,則花括號可以省略,函數的返回值為該條語句的執行結果;3、箭頭函數this指向聲明時所在作用域下this的值;4、箭頭函數不能作為構造函數實例化;5、不能使用arguments。

          代碼案例

          心箭頭

          <!DOCTYPE html>
          <html>
          <head>
          <meta charset="UTF-8">
          <title>實心箭頭</title>
          <style>
          .con{
              width: 300px;
              height: 300px;
              border: 1px solid #ccc;
              margin: 50px auto;
              background-color:#ccc;
          }
          .arrow-top{
              border-bottom: 10px solid #fff;
              border-right: 10px solid #fff;
              border-left: 10px solid #fff;
              border-top: 10px solid #ccc;
              width: 0px;
              height: 0px;
              position: relative;
              top:-40px;
              left:100px;
          }
          
          .arrow-bottom{
              border-bottom: 10px solid #fff;
              border-right: 10px solid #fff;
              border-left: 10px solid #fff;
              border-top: 10px solid #ccc;
              width: 0px;
              height: 0px;
              position: relative;
              top:-40px;
              left:100px;
          }
          </style>
          </head>
          <body>
          <div class="con">
          <div class="arrow-top"> </div>
          </div>
          </body>
          </html>



          非實心箭頭

          角形

          <!DOCTYPE html>
          <html lang="en">
          <head>
          <meta charset="UTF-8" />
          <title>三角形</title>
          <style type="text/css">
          body{
              background-color: pink;
          }
          div{
              width: 0px;
              height: 0px;
              border-top: 10px solid blue;
              border-right: 10px solid transparent;
              border-bottom: 10px solid transparent;
              border-left: 10px solid transparent;
              /* 唰(忽略不計) */
              /* border-width: 10px;
              border-style: solid;
              border-color: green orange blue pink; */
          }
          </style>
          </head>
          <body>
          <div>
          </div>
          </body>
          </html>

          箭頭

          <!DOCTYPE html>
          <html lang="en">
          <head>
          <meta charset="UTF-8" />
          <title>Document</title>
          <style type="text/css">
          *{
              margin: 0;
              padding: 0;
          }
          #bigBox{
              width: 0;
              height: 0;
              border-top: 200px solid black;
              border-right: 200px solid transparent;
              border-bottom: 200px solid transparent;
              border-left: 200px solid transparent;
          }
          #smallBox{
              width: 0;
              height: 0;
              border-top: 160px solid white;
              border-right: 160px solid transparent;
              border-bottom: 160px solid transparent;
              border-left: 160px solid transparent;
              position: absolute;
              left: 40px;
              top: 0;
          }
          </style>
          </head>
          <body>
          <div id="bigBox"></div>
          <div id="smallBox"></div>
          </body>
          </html>

          三角形使用案例:

          <!DOCTYPE html>
          <html>
          <head>
          <meta charset="UTF-8">
          <title></title>
          <style type="text/css">
          *{
              margin: 0;
              padding: 0;
              list-style: none;
              line-height: 40px;
              cursor: pointer;
          }
          ul{
              width: 200px;
              margin: 0 auto;
              border: 1px solid #000;
          }
          h3{
              text-indent: 1em;
              background-color: dodgerblue;
              position: relative;
          }
          h3:before{
              content: "";
              width: 0;
              height: 0;
              border-top: 8px solid transparent;
              border-right: 8px solid transparent;
              border-bottom: 8px solid transparent;
              border-left: 8px solid #000;
              position: absolute;
              left: 5px;
              top: 12px;
          }
          h3.active:before{
              border-top: 8px solid #000;
              border-left: 8px solid transparent;
              left: 0px;
              top: 15px;
          }
          </style>
          </head>
          <body>
          <ul>
          <li>
          <h3>我的好友</h3>
          
          </li>
          <li>
          <h3 class="active">企業好友</h3>
          
          </li>
          <li>
          <h3>黑名單</h3>
          
          </li>
          </ul>
          </body>
          </html>

          制作箭頭

          <!DOCTYPE html>
          <html lang="en">
          <head>
          <meta charset="UTF-8" />
          <title>Document</title>
          <style type="text/css">
          *{
              margin: 0;
              padding: 0;
          }
          #bigBox{
              width: 0;
              height: 0;
              border-top: 200px solid black;
              border-right: 200px solid transparent;
              border-bottom: 200px solid transparent;
              border-left: 200px solid transparent;
          }
          #smallBox{
              width: 0;
              height: 0;
              border-top: 160px solid white;
              border-right: 160px solid transparent;
              border-bottom: 160px solid transparent;
              border-left: 160px solid transparent;
              position: absolute;
              left: 40px;
              top: 0;
          }
          </style>
          </head>
          <body>
          <div id="bigBox"></div>
          <div id="smallBox"></div>
          </body>
          </html>

          實例: 實心箭頭上下左右


          主站蜘蛛池模板: 精品一区二区三区四区电影| 亚洲欧美日韩国产精品一区| 国产香蕉一区二区在线网站 | 国产成人久久精品一区二区三区| 国产精品一区在线麻豆| 人妻无码一区二区三区| 毛片一区二区三区无码| 日韩人妻无码一区二区三区久久| 亚洲AV无码一区二区三区国产| 免费无码一区二区三区蜜桃大| 精品欧洲av无码一区二区14| 一级特黄性色生活片一区二区| 无码精品不卡一区二区三区| 国产精品一区二区毛卡片| 无码av免费毛片一区二区| 五月婷婷一区二区| 无码人妻精品一区二区三区蜜桃| 中文字幕精品一区影音先锋| 中文字幕精品一区二区日本| 亚洲福利电影一区二区?| 久久久av波多野一区二区| 亚洲无删减国产精品一区| 日韩人妻无码一区二区三区久久| 无码免费一区二区三区免费播放| 久久精品无码一区二区三区| 亚洲av鲁丝一区二区三区| 久久久国产精品亚洲一区| 日韩国产免费一区二区三区 | 国产一区二区三区在线观看精品| 夜夜爽一区二区三区精品| 中文字幕在线一区二区三区| 国产亚洲无线码一区二区 | 毛片无码一区二区三区a片视频 | 国产成人精品一区二区三区| 成人精品视频一区二区三区 | 日本精品高清一区二区2021| 日本精品一区二区三本中文| 国产精品一区12p| 国产精品亚洲午夜一区二区三区 | 国产天堂在线一区二区三区| 亚洲男人的天堂一区二区|