// 重写选择框
input[type='radio'] {
width: 1px;
height: 24px;
opacity: 0;
display: none;
}
// 未选中
label {
background-image: url(/hrloo/rz/img/tpl/radio_nor2.png);
background-repeat: no-repeat;
background-position: 0px center;
width: 74px;
._f(n,14px,34px);
color: #666666;
display:inline-block;
padding-left: 22px;
}
// 选中
input[type="radio"]:checked + label {
background-image: url(/hrloo/rz/img/tpl/radio_hov.png);
}
// 禁用
input[type="radio"]:disabled + label {
background: #ddd;
}
// 禁用 选中
input[type="radio"]:checked:disabled + label {
background: #ddd;
}
node-crawler 是一个轻量级的node.js爬虫工具,兼顾了高效与便利性,支持分布式爬虫系统,支持硬编码,支持http前级代理。
node-crawler 完全由nodejs写成,天生支持非阻塞异步IO,为爬虫的流水线作业机制提供了极大便利。同时支持对 DOM 的快速选择,对于抓取网页的特定部分的任务可以说是杀手级功能,无需再手写正则表达式,提高爬虫开发效率。
cheerio中文文档: https://www.jianshu.com/p/629a81b4e013
cheerio是jquery核心功能的一个快速灵活而又简洁的实现,主要是为了用在服务器端需要对DOM进行操作的地方
HTML
<script>
seajs.config({
alias: {
'jquery' : "",
'second' : '/dk/js/index_second_wap.js' // 第二屏JS
},
preload: ['jquery']
});
seajs.use('/dk/js/index_wap.js'); // 页面入口JS
</script>
页面入口JS: /dk/js/index_wap.js
define(function(require, exports, modules) {
// 公共模块
var $ = require("jquery");
var t = require("tools");
$(document).ready(function() {
// 异步加载第二屏JS依赖后执行相关代码
require.async('second',function(second){
second('dk_home');
});
});
});
// 音频播放
audioPlayFragment.init(window.dk_audio_config);
插件作者地址:https://github.com/sxei/pinyinjs/
一个实现汉字与拼音互转的小巧web工具库,另外还包含一个非常非常简单的JS版拼音输入法。
演示地址:http://demo.haoji.me/pinyinjs/
支持多音字演示:http://demo.haoji.me/pinyinjs/polyphone.html
更多详细介绍:http://blog.haoji.me/pinyinjs.html
本工具的优点: