Console.log Styling, Ascii Art

5378 ワード

💬 Preview



💬 Ascii Art


簡単に言えば、文字と特殊文字を組み合わせて絵画の芸術(?)を模倣するに表示されます.
'>..<“,”
アシュッチアートとも言える.

(現在の私のブログのアイコンをAscii Artに変換)
アスキーアートはhttps://wepplication.github.io/tools/asciiArtGen/に変換されました
上のサイトでできます.

💬 Console.log Styling


'console.log()は、Webコンソールに文字を出力する関数です.
通常、開発者は値を決定するために使用します.
隠し(?)イースタープレゼント(?)作成します.
次のコードは例です.
console.log("%c검은색 %c갈색 %c빨간색 %c주황색 %c노란색 %c초록색 %c파란색 %c보라색 %c회색 %c흰색 %c금색 %c은색",
      "color: black", "color: chocolate", "color: red", "color: orange", "color:yellow", "color:green", "color:blue", "color:purple", "color:gray", "color:white", "color:gold", "color:silver");

(だからこれは本人が専攻の時に習った...抵抗帯の色...)
したがって、上記のアスキーアートに接続すると、以下のように使用できます.
console.log(`%c\n
      :::::::::  :::::::::: :::::::::
      :+:    :+: :+:        :+:    :+:
      +:+    +:+ +:+        +:+    +:+
      +#++:++#:  +#++:++#   +#+    +:+
      +#+    +#+ +#+        +#+    +#+
      #+#    #+# #+#        #+#    #+#
      ###    ### ########## #########
      `, `color:red`);

      console.log(`%c\n
      ::::::::  :::::::::  :::::::::: :::::::::: ::::    :::
     :+:    :+: :+:    :+: :+:        :+:        :+:+:   :+:
     +:+        +:+    +:+ +:+        +:+        :+:+:+  +:+
     :#:        +#++:++#:  +#++:++#   +#++:++#   +#+ +:+ +#+
     +#+   +#+# +#+    +#+ +#+        +#+        +#+  +#+#+#
     #+#    #+# #+#    #+# #+#        #+#        #+#   #+#+#
      ########  ###    ### ########## ########## ###    ####
      `, `color:green`);

      console.log(`%c\n
      :::::::::  :::        :::    ::: ::::::::::
      :+:    :+: :+:        :+:    :+: :+:
      +:+    +:+ +:+        +:+    +:+ +:+
      +#++:++#+  +#+        +#+    +:+ +#++:++#
      +#+    +#+ +#+        +#+    +#+ +#+
      #+#    #+# #+#        #+#    #+# #+#
      #########  ##########  ########  ##########
      `, `color:blue`);
終わりだ!