引用jQuery的插件jquery.pseudo.js
插件内容:

(function($){

    var patterns = {
text: /^['"]?(.+?)["']?$/,
url: /^url\(["']?(.+?)['"]?\)$/
}; function clean(content) {
if(content && content.length) {
var text = content.match(patterns.text)[1],
url = text.match(patterns.url);
return url ? '<img src="' + url[1] + '" />': text;
}
} function inject(prop, elem, content) {
if(prop != 'after') prop = 'before';
if(content = clean(elem.currentStyle[prop])) {
$(elem)[prop == 'before' ? 'prepend' : 'append'](
$(document.createElement('span')).addClass(prop).html(content)
);
}
} $.pseudo = function(elem) {
inject('before', elem);
inject('after', elem);
elem.runtimeStyle.behavior = null;
}; if(document.createStyleSheet) {
var o = document.createStyleSheet(null, 0);
o.addRule('.dummy','display: static;');
o.cssText = 'html, head, head *, body, *.before, *.after, *.before *, *.after * { behavior: none; } * { behavior: expression($.pseudo(this)); }';
} })(jQuery); 引入插件后,即可在ie8中使用伪类选择器。

最新文章

  1. LINUX端口查看
  2. WARN: Establishing SSL connection without server&#39;s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default i
  3. C#设计模式(7)——适配器模式(Adapter Pattern)
  4. Lucene 4.X 倒排索引原理与实现: (3) Term Dictionary和Index文件 (FST详细解析)
  5. 开启InnoDB每表一个独立的表空间
  6. wifidog编译到openwrt
  7. 动态规划(计数DP):HDU 5136 Yue Fei&#39;s Battle
  8. buffer busy waits
  9. Java小项目--坦克大战(version1.0)
  10. Codeforces Round #199 (Div. 2) B. Xenia and Spies
  11. Flink 1.3.2 Standalone模式安装
  12. CCF-201412-3-集合竞价
  13. np.array转换为list,嵌套的python list转成一个一维的python list
  14. Appium基于Python unittest自动化测试 &amp; 自动化测试框架 -- PO并生成html测试报告
  15. warn_alloc():page allocation failure问题分析
  16. OpenCV3编程入门-读书笔记2-core组件
  17. Glide 加载部分圆角图片
  18. (转)Linux SSH配置和禁止Root远程登陆设置
  19. 好汉两个半第十二季/全集Two and a Half Men迅雷下载
  20. GreenOpenPaint的实现(五)矩形框

热门文章

  1. qq教xixi写模拟加法【非常爆炸】
  2. oj判题WA/RE怎么办
  3. Centos 6.8安装 SVN
  4. UvaLive6439(string使用、回文串)
  5. Coloring Trees CodeForces - 711C
  6. 转 python 将一个文件中内容添加到另一个文件指定位置
  7. ES相关概念理解
  8. Java GC基础
  9. 解决IDEA Tomcat控制台乱码问题
  10. 开发原生安卓cordova插件(有原生界面)