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
相关文档:
盒子标签和属性对照
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 ......
网页开发人员都知道,现在的浏览器对不同的js,css的解析不尽相同,特别是IE早期版本的不规范.不过以后会好一些,现在的浏览器新版本都在向W3C靠拢.现在我们要解决的是现在的问题.
解决css和js针对不同浏览器兼容的问题
首先谈一下浏览器,虽然现在ie依然是浏览器市场的老大,大约占有67%的份额,但是由于其各方面的 ......
1.div的垂直居中问题
vertical-align:middle;
将行距增加到和整个DIV一样高 line-height:200px;
然后插入文字,就垂直居中了。缺点是要控制内容不要换行。
2. margin加倍的问题
设置为float的div在ie下设置的margin会加倍。这是一个ie6都存在的bug。
解决方案 ......
原样式:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>52css.com</titl ......
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 网格工具,可用于简化内容管理系统的 ......