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精品视频免费,在线观看你懂的网址,亚洲高清不卡视频

          整合營銷服務商

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

          免費咨詢熱線:

          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无码一区二区三区| 日韩一区二区三区精品| 国产欧美一区二区精品仙草咪| 国模私拍一区二区三区| 日本一区二区三区在线网| 国产欧美色一区二区三区| 无码少妇一区二区浪潮免费| 无码人妻精品一区二区三区在线| 国产一区精品视频| 福利一区二区视频| 国产乱码精品一区二区三区四川人 | 秋霞午夜一区二区| 国产一区二区内射最近更新| 国产一区二区精品久久岳| 国产另类ts人妖一区二区三区| 无码人妻精品一区二| 精品一区二区三区在线播放| 搜日本一区二区三区免费高清视频| 亚洲国产精品无码第一区二区三区| 91精品一区二区综合在线| 亚洲AV无码一区二区三区DV | 亚洲一区精品视频在线| 一区二区视频在线观看| 国产91久久精品一区二区| 亚洲另类无码一区二区三区| 中字幕一区二区三区乱码| 麻豆精品人妻一区二区三区蜜桃| 99久久精品日本一区二区免费| 亚洲av无码片vr一区二区三区 | 好吊妞视频一区二区| 最新中文字幕一区| 亚洲一区二区三区在线播放|