链接的虚线框问题

<!-- html -->
<a class="noDashedBox" href="#"><img src="http://j5.dfcfw.com/image/201406/20140603152217.png" /></a>
/*
* a, img, input等标签点击时会带有虚线框
* 去除它
*/
.noDashedBox {
outline:;
blr:expression(this.onFocus=this.blur());
}

固定定位

<!-- html -->
<a class="fixedTop" href="#"><img src="http://j5.dfcfw.com/image/201406/20140603152217.png" /></a> <a class="fixedBottom" href="#"><img src="http://j5.dfcfw.com/image/201406/20140603152217.png" /></a>
/*  css  */
.fixedTop {
position:fixed;
top:100px;
left:50%;
margin-left:500px;
_position:absolute;
_top:expression(eval(document.documentElement.scrollTop + 100));
} .fixedBottom {
position:fixed;
bottom:50px;
left:50%;
margin-left:500px;
_position:absolute;
_top:expression(eval(document.documentElement.scrollTop + document.documentElement.clientHeight - 70));
}

png背景图片透明:for ie6

<!-- html -->
<div class="pngOpacity"></div>
按 Ctrl+C 复制代码
按 Ctrl+C 复制代码
// png透明的js解决方案  http://www.zhangxinxu.com/study/js/png.js
if (!window.XMLHttpRequest) {
window.attachEvent("onload", enableAlphaImages);
} function enableAlphaImages(){
for (var i=0; i<document.all.length; i++){
var obj = document.all[i];
var bg = obj.currentStyle.backgroundImage;
var img = document.images[i];
if (bg && bg.match(/\.png/i) != null) {
var img = bg.substring(5,bg.length-2);
var offset = obj.style["background-position"];
obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img+"', sizingMethod='crop')";
obj.style.background = "none";
} else if (img && img.src.match(/\.png$/i) != null) {
var src = img.src;
img.style.width = img.width + "px";
img.style.height = img.height + "px";
img.style.filter ="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')"
img.src = "http://s1.95171.cn/b/img/pixel.gif"; //替换透明PNG的图片
 } } }

opacity透明:整个元素透明,包括元素里面的内容

<!-- html -->
<div class="opacity"><span style="color:yellow;">this is opacity text</span></div> <div class="opacity"><span style="color:yellow;position:relative;">this is text that not opacity in ie</span></div>
.opacity {
background: #000;
filter:alpha(opacity=50);
*zoom:; /* sometimes it is needed */
opacity: 0.5; font-size: 38px;
color:#fff;
}

rgba透明:只对背景透明,内容不会受到影响

<!-- html -->
<div class="rgbaAlpha">red green blue and alpha</div>
/* css */
.rgbaAlpha {
width:300px;
height:auto;
padding:50px;
filter:progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);
background: rgba(0, 0, 0, 0.5); font-size: 38px;
color:#fff;
}

最新文章

  1. 对抗静态分析——so文件的加密
  2. go tool proof
  3. 212. Word Search II
  4. 关于521(nyoj)
  5. [Android学习笔记]LinearLayout布局,剩余空间的使用
  6. java io流之int数组数据的插入与取出
  7. 关于phpcms中模块_tag.class.php中的pc_tag()方法的含义
  8. windows指令
  9. 主席树——求区间第k个不同的数字(向右密集hdu5919)
  10. 【LOJ2586】【APIO2018】选圆圈 CDQ分治 扫描线 平衡树
  11. https://www.chromestatus.com/features/5093566007214080
  12. fs.inotify.max_user_watches默认值太小,导致too many open files
  13. openshift 容器云从入门到崩溃之三《安装openshift》
  14. The Little Prince-12/13
  15. SQLServer和MySql的区别总结
  16. ADO.NET介绍2
  17. C#索引器理解
  18. web前端----JavaScript对象
  19. Scala入门系列(六):面向对象之object
  20. oracle11g字符集问题之一

热门文章

  1. javascript获取星期
  2. 连续调用scanf的问题总结
  3. 点击出现黑色背景的解决:-webkit-tap-highlight-color:rgba(0,0,0,0)
  4. 配置fio支持rbd測试引擎
  5. Struts2学习九----------处理结果类型(input)
  6. PHP和mysql的长连接
  7. JavaScript系列问题
  8. centOS中如何修改运行级别!
  9. php生成唯一的串
  10. OIer同样是音乐家