易截截图软件、单文件、免安装、纯绿色、仅160KB

js 修改CSS文件中的样式

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
    <style id="">
.class1{
margin-left:135px;
margin-top:1px;
}
.b{
margin-left:135px;
margin-top:1px;
}
</style>
<script>
function hidden(){
 if(typeof document.styleSheets != "undefined")
 {
   var printStyleSheet = document.styleSheets[0];
   var printRules = null;
  
   if (typeof printStyleSheet.rules != "undefined")
   {
    printRules = printStyleSheet.rules;
   }else{
   printRules = printStyleSheet.cssRules;
   }
  for(var i=0; i <printRules.length; i++)
   {
   //alert(printRules[i]["selectorText"]);
   if(printRules[i]["selectorText"]==".class1")
   {
    printRules[i].style.display = "none";
   }
   }
 }
}
</script>
 </HEAD>
 <BODY>
<div class="class1">123446</div>
<br />
<a href="#" onclick="hidden();">CLICK ME</a>
 </BODY>
</HTML>


相关文档:

JS和CSS属性对照表


盒子标签和属性对照
CSS语法(不区分大小写)
JavaScript语法(区分大小写)
border
border
border-bottom
borderBottom
border-bottom-color
borderBottomColor
border-bottom-style
borderBottomStyle
border-bottom-width
borderBottomWidth
border-color
borderColor
border-left
borderLeft
border ......

CSS布局口诀

 
  
如果在用CSS设计布局时遇到BUG,请认真阅读以下内容,非常容易记忆的,不知道哪位高人把CSS BUG编成了顺口溜了!看看好不好记住呢?
一、IE边框若显若无,须注意,定是高度设置已忘记;
二、浮动产生有缘故,若要父层包含住,紧跟浮动要清除,容器自然显其中;
三、三像素文本慢移不必慌,高度设置帮你忙 ......

纯CSS无图实现DIV边框平滑阴影

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>CSS边框阴影< ......

5个简单,但很实用的 css属性

这5个有用的css属性可能你是比较熟悉的,但是很少使用到它们。我这里讨论的不是css3的新属性
。我提到的都是被所有浏览器支持的css2属性比如:clip、min-height、white-space、cursor和display。千万别错
过这篇文章,因为你会惊讶的发现他们是很有用的。
一、css clip(裁切)
clip裁切这个属性有点像是遮罩。它允许你 ......

CSS 菜单系列:用 UL 制作横向导航菜单-入门版

用 UL 制作菜单现在非常流行,那我们也凑凑热闹,第一讲就说说用 UL 制作导航菜单的方法,这一讲是入门版,只是实现基本功能,欢迎各位发布自己的实现方式。
我们先定一下 HTML 代码:
<ul id="menu">
<li><a href="http://www.codebit.cn">CodeBit.cn</a></li>
<li><a href="h ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号