css常用技巧

一、让浏览器显示word格式文本

 <meta  http-equiv="content-type"   content="application/msword" />

二、设置浮动背景

<style>

 body{ background-attachment:fixed;background-image:url(image/1.gjf);}

</style> 

三、正确对齐文本

<style>

.dq{margin-left:68px;margin-right:70px;margin-top:69px;margin-bottom:71px;}

</style>

四、解决list-style-image无法正确定位的问题

<style>

li{ list-style:url ("http://gluu5.163.com//E/11/ 6.gif");}

li a{position:relative;top:-5px;font:12px/25px  宋体;}

</style>

五、使一个层垂直居中于浏览器

<style>

div{

  position:absolute;

  top:70%;

  left:50%;

  margin:-150px 0 0 -150px;

  width:200px;

  height:200px;

  border:1px solid #0066ff;

}

</style>

六、巧妙设置滚动条颜色

<style>

html{

  scrollbar-face-color:#f6f6f6;

  scrollbar-highlight-color:#fff000;

  scrollbar-shadow-color:#ee00ee;

  scrollbar-3dlight-color:#ee222e;

  scrollbar-arrow-color:#ccc000;;

  scrollbar-track-color:#ddeecc;

  scrollbar-darkshadow-color:#fffddd;

}

</style>

七、实现图片循环隐现的效果

<script>

var b=1;

var c=true;

function fade( ){

  if( document.all );

  if( c==true ){

  b++;

}

if ( b==100 ){

 b--;

 c=false;

}

if ( b==10){

 b++;

 c=true;

}

if( c==false ){

 b--;

}

u.filters.alpha.opacity= 0 +b;

setTimeout(" fade( ) " ,50 );

}

</script>

<body onLoad="fade( )"><img align="middle"    name="n"   style="filter:alpha(opacity=0) /></body>

八、禁止保存页面

<noscript><iframe  src="*.htm"></iframe></noscript>

九、禁止页面最小化

<body οnblur='self.focus( );'

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值