前几天为了查找字体转换工具网上搜索,既然用 Node.js 来做的工具. https://github.com/fontello/ttf2eot https://github.com/fontello/ttf2woff https://github.com/qdsang/ttf2svg https://github.com/fontello/svg2ttf 先安装 node https://nodejs.org/en/ npm install -g ttf2eot npm install -g…
转载自:http://blog.csdn.net/xiaolongtotop/article/details/8316554 目前,文字信息仍是网站最主要的内容,随着CSS3技术的不断成熟,Web字体逐渐成为话题,这项让未来Web更加丰富多彩的技术拥有多种实现方案,其中之一是通过@font-face属性在网页中嵌入自定义字体,主流的浏览器都支持这项技术,本文介绍主要的几种Web字体格式及字体格式转换. Web字体格式介绍 TrueType (.ttf) Windows和Mac系统最常用的字体格式…
C# MVC 用户登录状态判断   来源:https://www.cnblogs.com/cherryzhou/p/4978342.html 在Filters文件夹下添加一个类AuthenticationAttribute ,代码如下: // 登录认证特性 public class AuthenticationAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingCont…
js时间格式转换 格式化时间转成时间戳 //格式化转时间戳(单位秒) function strtotime(strtime) { strtime = strtime.substring(0, 19); strtime = strtime.replace(/-/g, '/'); strtime = new Date(strtime).getTime() / 1000; return strtime; } 时间戳转格式化时间 //时间戳(单位秒)转格式化 function getMyDate(str…
moment.js 时间格式转换 moment.js 时间转化 bug 格式错误 bug 02:00 => 14:00 format HH 与 hh HH === 24 小时制 hh === 12 小时制 new Date(1580796000000) // Tue Feb 04 2020 14:00:00 GMT+0800 (China Standard Time) moment(1580796000000).format('YYYY MM DD, hh:mm:ss'); // "202…
@font-face { font-family: 'emotion'; src: url('emotion.eot'); /* IE9*/ src: url('emotion.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('emotion.woff') format('woff'), /* chrome.firefox */ url('emotion.ttf') format('truetype'), /* chrome…
在javascript中直接输出Date得到的结果是这样的: function date(){ var date = new Date(); alert(date); } 结果是:Mon Jun 15 15:30:46 UTC+0800 2009 这可能不是我们所需要的,因此是需要转换下的,这里有转换的几种方法: 1.得到new Date()型中各个时间级别(年.月.日.时.分.秒)的数: function date(){ var date = new Date(); var year = da…
之前js获取到数据库的Date,总是显示成: 后来知道是js 的Date 格式不能直接转换常用的yyyy-MM-dd 的格式 Date.prototype.yyyymmdd = function () { var yyyy = this.getFullYear().toString(); var mm = (this.getMonth() + 1).toString(); // getMonth() is zero-based var dd = this.getDate().toString()…
公司项目需要获取时间并且转换格式,之前没有实现过但读过源码,新来的小哥给我讲了下细节.算是学到了..... function getLocalTime(){ var now=new Date(); var year=now.getFullYear(); var moth=now.getMonth()+1; if(month<10){ moth="0"+month; } var date=now.getDate(); if(date<10){ date="0&quo…
1.stringify函数的基本用法 stringify函数的作用就是序列化对象,也就是说将对象类型转换成一个字符串类型(默认的分割符("&")和分配符("=")),本节先介绍它的基本用法,在下一节里我们将学习如何替换默认分配符,下面我们就通过以下例子来清楚的认识一下吧! 例1:querystring.stringify("对象") var querystring= require('querystring'); var result =…