更多>
最新下载
24小时阅读排行榜
- 1 Go语言并发程序如何压测_Golang并发性能测试
- 2 C++ 怎么获取当前日期 C++ time函数与localtime结构体详解【日期】
- 3 Go基准测试是什么 Golang Benchmark基本概念解析
- 4 ios如何调用html5虚拟键盘适配_ios键盘适配html5技巧【技巧】
- 5 C#怎么获取JSON中的特定值 C# JObject解析JSON节点方法
- 6 iSCSI session 频繁 logout/login 的 timeout / MPIO / queue_depth 配置
- 7 如何在 WPForms 表单成功提交后自动弹出 Fancybox 模态窗口
- 8 css 想让颜色渐变在状态切换时平滑过渡怎么办_使用背景渐变过渡控制效果
- 9 如何优雅扩展 pathlib.Path:函数式辅助优于继承与组合
- 10 如何在Golang中减少锁竞争_Golang sync优化与性能提升实践
- 11 CSS 中 inline-block 元素底部的意外空白:原因与解决方案
- 12 如何在 Python 线程池中实现真正的即时线程终止与优雅降级
- 13 标题:解决 inline-block 元素底部意外空白的原理与方案
- 14 如何在Golang中实现动态对象属性赋值_Golang reflect.SetValue方法技巧
- 15 C++怎么打印当前时间 C++ strftime格式化时间输出代码【日期】
更多>
最新教程
-
- Node.js 教程
- 16338 2025-08-28
-
- CSS3 教程
- 1547048 2025-08-27
-
- Rust 教程
- 23454 2025-08-27
-
- Vue 教程
- 25886 2025-08-22
-
- PostgreSQL 教程
- 22382 2025-08-21
-
- Git 教程
- 9330 2025-08-21
下载首页 / 类库下载 / 其它类库
<?php
header('Content-type: text/plain; charset=UTF-8');
$in = file_get_contents('emoji-data/emoji.json');
$catalog = json_decode($in, true);
echo file_get_contents('inc.css');
$max = 0;
foreach ($catalog as $item){
$max = max($item['sheet_x'], $max);
$max = max($item['sheet_y'], $max);
}
$fact = 100 / $max;
$sheet_size = $max + 1;
echo "span.emoji-inner { background-size: {$sheet_size}00%; }\n";
foreach ($catalog as $item){
$unilow = unicode_hex_chars($item['unified']);
$pos_x = $item['sheet_x'] * $fact;
$pos_y = $item['sheet_y'] * $fact;
echo ".emoji$unilow { background-position: {$pos_x}% {$pos_y}% !important; }\n";
}
function unicode_hex_chars($str){
$out = '';
$cps = explode('-', $str);
foreach ($cps as $cp){这是一份emoji的表情转换PHP类库,需要的朋友可以下载使用
本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:admin@php.cn
