更多>
最新下载
24小时阅读排行榜
- 1 Golang如何在协程中安全处理panic_Golang goroutine异常捕获方法
- 2 什么是隔离级别_mysql事务隔离级别
- 3 .NET MAUI如何上传XML文件 HttpClient的用法
- 4 如何在 openpyxl 中正确配置数据验证(Data Validation)
- 5 c# Interlocked.Exchange 和 volatile 赋值的区别
- 6 如何在Golang中实现值类型拷贝_理解浅拷贝与深拷贝
- 7 如何在 PHP 中精准替换文件中包含特定字符串的行
- 8 OpenSearch 中正确存储和查询字符串数组的完整指南
- 9 css 选择器中逗号表示什么_多规则匹配说明
- 10 css 想让多列布局在手机端变单列怎么办_通过网格布局和媒体查询实现列数自适应
- 11 JavaScript 中的逻辑运算符误用与时间边界处理详解
- 12 如何在 Go 模板中安全渲染 SQLX 查询结果为 HTML 表格
- 13 css 想让网格容器自动生成行怎么办_grid-auto-rows 设置
- 14 Go语言中递归展开指针结构的调试打印方法:使用spew替代fmt.Printf
- 15 mysql搭建酒店预订系统数据库结构设计
更多>
最新教程
-
- Node.js 教程
- 15785 2025-08-28
-
- CSS3 教程
- 1545584 2025-08-27
-
- Rust 教程
- 22992 2025-08-27
-
- Vue 教程
- 25479 2025-08-22
-
- PostgreSQL 教程
- 22005 2025-08-21
-
- Git 教程
- 9022 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
