实例:实时给中文添加拼音
技术栈:HTML+CSS+JS
效果:
源码:
【HTML】
<!DOCTYPE html>
<html lang="zh-CN">
<head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>实时给中文添加拼音</title><link rel="stylesheet" href="211.css"><!-- 这里用到的拼音库是:pinyin-pro --><script src="pinyin-pro.min.js"></script>
</head>
<body><div class="container"><input type="text" class="ipt" placeholder="输入试试.