欢迎使用在线英文字体设计生成器!本工具可帮助您轻松创建具有艺术感的英文字体。
document.addEventListener("DOMContentLoaded", function() {var form = document.querySelector("form");form.addEventListener("submit", function(e) {e.preventDefault();var text = document.getElementById("text").value;var output = document.getElementById("output");output.innerHTML = "";for (var i = 0; i < text.length; i++) {var character = text[i];// 创建一个新的
元素来包含字符var span = document.createElement("span");span.textContent = character;// 为字符随机应用样式var styles = ["font-family: Arial, sans-serif","font-family: Times New Roman, serif","font-family: Courier New, monospace","font-family: Georgia, serif","font-family: Verdana, sans-serif","font-family: Helvetica, sans-serif","font-family: Baskerville, serif","font-family: Palatino, serif","font-family: Futura, sans-serif","font-family: Impact, sans-serif"];var randomStyle = styles[Math.floor(Math.random() styles.length)];span.setAttribute("style", randomStyle);// 将
元素添加到输出中output.appendChild(span);}});});
标签:
英文字体设计艺术感、
英文字体设计在线生成器、
本文地址:
https://w6.hk/hlwzxwz/c774845d3c6d9bb75be3.html
上一篇:logo和商标商标和logo的区别...
下一篇:logo怎么p到图片上logo怎么申请注册...