console.log输出图片和ascii

2024年06月13日 建站教程

console输出自己想要的图片和ascii图形

console.log(
  '%c ',
  `padding: 25px 100px;
  margin:50px;
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABBCAYAAACU5+uOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABn9JREFUeNrsnD2O20YUxykjhQPEBXMEqXZF5QABtF0+KuoIUu0ADgU4pQ2ILuJaOoLVxelEIAfwqnFq8QjLIjZcrofGEHl+nnkzpIbSrvT/AQNbyxE5M3z/eR/k7uDh03eR5mfVnqj2g2rfRefLe9Xeqvanan/XP/j48nEEgIkH+t/nqv2l2o9nLo5Iz6+e5xs9bwBEgfyk2rMLnf8z7TkBsArktwtfgycwAyAJZHzhazCGGQBJII8ufA0ewQyAK0kHAEAgAEAgAEAgAEAgAEAgAEAgAEAgAEAgAEAgAAAIBAAIBAAIBAAIBAAIBAAIBID7wTf3cdAfXz4e0M/f/v7vRP2z7et66vzNf+trTMih+rcRd46vD1Xbk89r1eYBhrVULSOf5/rcLm4DjSXTY2i4Uq1wfIeu305/p/K8lonYsAYFW2+JUt+fhoVqOf0rN/Ag7eAGMGE3/9bQ+M2aWfo1beU5ltzTiEIwMYxzaTB+09xjcg66XolqNx7r1azZ0tD4nHct55UjxAoL36HTI157z0Q00zsg9VSSgZ5qvaqWAjYZ7VS1gW4jdmxEjpkEMifHeVtDIGGpb/aG7YIJCTFMN2FkMBrepy3Njjp09Js7QpiZpwcrDGNesD6m+ecW77GwzL2wGO3uVDccAgkbZvXJSNgJba3ocJ38wHGuiNhutIgztsms78vNhkC6hQ3cTU+EnMInB+HHry3JPv2OqSjxmvWZtJzLgIVtbUn0+KnYhgbvUbU459CxnjT0DJ6HmapYI5XFl6yKc8Ni2Z3qMybHecJUqePfs3PEdyAm7ivs6jvXaSouFVm/xGJMfYQmPlXCrSWEuxLCyDjwWm4sHm0VUiCpwc0WLCHdGG5oJoQhzSLXC1KX0Rb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6r6HvSuVYtr9U1zo18fOQ/xYRod8Barx/h8z52yjTJnXiDXfWgFahwo8e4SSn4hwMHDp+/uirGdDP5HIADwDbEAgEAAABAIABAIABAIABAIABAIABAIABAIABAIABAIAAACAQACAQACAQACAQACAeDuCeS/C1+D9zADIAnk+sLX4C3MAEgCeXXha/AKZgAkgbxR7cWFzv+Fnj8AYpL+h2q/qvaPah/OfM4f9Dx/0fMGwMonAQYA3lIwlhcPEzMAAAAASUVORK5CYII=') no-repeat`
)
var ascii = `
  _    _      _ _        __          __        _     _ 
 | |  | |    | | |       \ \        / /       | |   | |
 | |__| | ___| | | ___    \ \  /\  / /__  _ __| | __| |
 |  __  |/ _ \ | |/ _ \    \ \/  \/ / _ \| '__| |/ _` |
 | |  | |  __/ | | (_) |    \  /\  / (_) | |  | | (_| |
 |_|  |_|\___|_|_|\___/      \/  \/ \___/|_|  |_|\__,_|                                                                                                                                                                                  
`
console.log(`%c${ascii}`,'color:#e59de3')

输出结果

本文链接:http://so.lmcjl.com/news/6480/

展开阅读全文
相关内容