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

无刷新变换CSS样式表

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<TITLE>无刷新变换样式表</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="jsfile/imagesa35/css1.css" rel="stylesheet" type="text/css" id="css">
</HEAD>
<script type="text/javascript">
function change(a){
 var css=document.getElementById("css");
  if (a==1)
  css.setAttribute("href","jsfile/imagesa35/css1.css");
  if (a==2)
  css.setAttribute("href","jsfile/imagesa35/css2.css");
  if (a==3)
  css.setAttribute("href","jsfile/imagesa35/css3.css");
}
</script>
<BODY>
 <div id="chs">
  <a href="#" onClick="change(1)">使用样式表1</a>
  <a href="#" onClick="change(2)">使用样式表2</a>
  <a href="#" onClick="change(3)">使用样式表3</a><br />换了样式表
 </div>
</BODY>
</HTML>


相关文档:

CSS常见兼容性问题


DOCTYPE 影响 CSS 处理
Firefox: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行
Firefox: body 设置 text-align 时, div 需要设置 margin: auto(主要是 margin-left,margin-right) 方可居中
Firefox: 设置 padding 后, div 会增加 height 和 width, 但 IE 不会, 故需要用 !important 多设一个 heig ......

DIV+CSS中标签ul ol li dl dt dd用法

ul ol li dl dt dd都是DIV+CSS做网页长用的东西,相当于一棵树的树技,下面就了解一下这些东西的全体用法,本人用dd,dt,dl用得很少,懂得结合使用对做架构是很有好处的哦!
DIV
CSS网页布局中常用的列表元素ul ol li dl dt dd释义,块级元素div尽量少用,和table一样,嵌套越少越好
ol
有序列表。
<ol>
<li> ......

10个非常有用的CSS技巧


1. 将网页或元素居中       
      
    
HTML:
<div class="wrap">  
</div><!-- end wrap -->  
CSS:
.wrap { width:960px; margin:0 auto;}   ......

css div 鼠标经过时图片变大

<style>
#enlarge {padding:0; margin:2em auto; list-style-type:none; width:240px;
height:40px;}
#enlarge li {display:block; float:left; width:40px; height:40px;
position:relative;}
#enlarge li a {display:block; width:40px; height:40px; background:transparent;
overflow:hidden; positio ......

根本不存在 DIV + CSS 布局这回事

 转:写的不错,对于网页开发有指导意义
在《欲练 CSS ,必先宫 IE》和《你有 <table /> 强迫症吗?》这两篇文章中,看到有不少评论用到div+CSS布局这个说法,用来和table布局比较。实际上div不是用来布局的,div只是用来表示一个其它元素都无法准确表达语意的一个块区,只有CSS是用于布局的,所以根本就不存在di ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号