在其他网站偶然看到的,觉着应该有人会需要这种在线字体预览,大多数是字体网站,也可以放在自己网站当一个小工具使用,需要的自取。
<!DOCTYPE html> <html> <head> <title>字体预览</title> <style> .container { margin: 20px; } .header { font-size: 12pt; color: gray; } .font-preview { font-size: 42pt; font-weight: bold; } .controls { display: flex; align-items: center; margin-top: 10px; } .slider { margin: 0 10px; } .dropdown { margin-right: 10px; } .font1 { font-family: Arial, sans-serif; } .font2 { font-family: 'Times New Roman', serif; } </style> </head> <body> <div> <div>字体选择</div> <div> <select id="fontSelector" onchange="updatePreview()"> <option value="font1">字体1</option> <option value="font2">字体2</option> </select> <label for="fontSize">A-</label> <input type="range" id="fontSize" min="10" max="100" value="42" oninput="updatePreview()"> <label for="fontSize">A+</label> <span id="fontSizeValue">42pt</span> <input type="color" id="fontColor" value="#000000" onchange="updatePreview()"> </div> <hr> <div id="fontPreview">字体预览</div> </div> <script> function updatePreview() { const fontSize = document.getElementById('fontSize').value; const fontColor = document.getElementById('fontColor').value; const fontPreview = document.getElementById('fontPreview'); const selectedFont = document.getElementById('fontSelector').value; fontPreview.style.fontSize = fontSize + 'pt'; fontPreview.style.color = fontColor; fontPreview.className = 'font-preview ' + selectedFont; document.getElementById('fontSizeValue').textContent = fontSize + 'pt'; } </script> </body> </html>
本站提供的一切软件、教程和内容信息仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络收集整理,如果您喜欢该程序和内容,请支持正版,购买注册,得到更好的正版服务。我们非常重视版权问题,如有侵权请邮件与我们联系处理。敬请谅解!
如若转载,请注明出处:https://www.zxperson.com/42.html
HI ! 请登录
立即登录【安卓】植物大战僵尸杂交版-直装版本-最新V2.4
09-21
AnyViewer 傲梅远程桌面专业版最新领1年激活码
09-19
AE视频处理软件 Adobe After Effects 2023(23.6.6)中文直装版
09-14
PR视频编辑软件 Adobe Premiere Pro 2023(23.6.7.1)直装版
09-13
孙行者虚拟定位v1.0绿化版 一键定位 完全免费
09-11
HnciseOS v9.0.0虚拟机系统rom定制版
09-10
Github文件下载器v1.0绿色版
09-07
Direct 直达 - 集合各种 APP 搜索引擎应用
09-06
heibai弹幕纯净版v1.5.6.1 免费追番神器
09-05
0v0免费在线 AI 抠图工具
08-29
09日04日,星期三,在这里每天60秒读懂世界!
09-04
08日28日,星期三,在这里每天60秒读懂世界!
08-28
07日19日,星期五,在这里每天60秒读懂世界!
07-19
07日18日,星期四,在这里每天60秒读懂世界!
07-19
07日17日,星期三,在这里每天60秒读懂世界!
07-17
07日16日,星期二,在这里每天60秒读懂世界!
07-16
07日15日,星期一,在这里每天60秒读懂世界!
07-15
07日14日,星期日,在这里每天60秒读懂世界!
07-15
07日13日,星期六,在这里每天60秒读懂世界!
07-13
07日12日,星期五,在这里每天60秒读懂世界!
07-12