JS+CSS漂亮相册效果
<!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=utf-8" />
<title>JS+CSS相册展示</title>
<style>
*{ margin:0; padding:0; list-style:none}
body{ font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:1.8;}
img{ display:block; border:0;}
h1,h2{ background:#85B829; line-height:2.5; font-size:14px; padding-left:10px; color:#fff;}
#pics{ border-left:3px solid #468C50; border-right:3px solid #99CC99; background:#B5DF63; float:left; width:750px;}
li{ float:left;}
a{ display:block; background:#fff; border:1px solid #A4D742; text-align:center; color:#598628; text-decoration:none; padding:5px; margin:10px;}
a:hover,a:active{ background:#99CC33; border:1px solid #85B829; border-left:1px solid #fff; border-top:1px solid #fff; color:#fff}
#showpic{ border:1px solid #85B829; padding:5px; display:none; clear:left; background:#FFF; text-align: center}
ul,#showpic{ margin:10px;}
h2{ color:#598628; background:none; text-align:left}
#showpic img{ margin:auto}
</style>
</head>
<body>
<div id="pics">
<h1>我的图集</h1>
<ul>
<li><a href="/jscss/demoimg/wall1.jpg" title="来天来了"><img src="/jscss/demoimg/wall_s1.jpg" />春天</a></li>
<li><a href="/jscss/demoimg/wall2.jpg" title="黄昏风景"><img src="/jscss/demoimg/wall_s2.jpg" />黄昏</a></li>
<li><a href="/jscss/demoimg/wall3.jpg" title="树林风光"><img src="/jscss/demoimg/wall_s3.jpg" />树林</a></li>
<li><a href="/jscss/demoimg/wall4.jpg" title="漂亮城市"><img src="/jscss/demoimg/wall_s4.jpg" />漂亮</a></li>
</ul>
</div>
<script language="javascript">
function setDiv(){
var pics
相关文档:
模块:module.css
基本共用:base.css
布局、版面:layout.css
主题:themes.css
专栏:columns.css
文字:font.css
表单:forms.css
补丁:mend.css
打印:print.css
头:header
内容:content/container
尾:footer
导航:nav
侧栏:sidebar
栏目:column
页面外围控制整体布局宽度: ......
盒子标签和属性对照
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 ......
1.div的垂直居中问题
vertical-align:middle;
将行距增加到和整个DIV一样高 line-height:200px;
然后插入文字,就垂直居中了。缺点是要控制内容不要换行。
2. margin加倍的问题
设置为float的div在ie下设置的margin会加倍。这是一个ie6都存在的bug。
解决方案 ......
50款css工具
引自:http://bbs.seuuo.com/thread-2613-1-3.html
50款CSS工具,包含,CSS网格和布局工具,CSS 优化工具,CSS 菜单生成工具,CSS 按钮生成器,CSS 圆角生成器,CSS 框架,CSS Sprites生成器,CSS 排版工具以及 CSS 表单生成器。
网格和布局The 1KB CSS Grid
新颖的 CSS 网格工具,可用于简化内容管理系统的 ......
几个css元素的简单解释 div ul dl dt oldiv,这个很常见,块级元素,div尽量少用,和table一样,嵌套越少越好
ol 有序列表。
<ol>
<li>……</li>
<li>……</li>
<li>……</li>
</ol>
表现为:
1……
2…& ......