Archive

For the Css category

转载 兼容主流浏览器实现position fixed

No Comments







重庆著名的是那色香味俱佳的火锅超过火锅,一个著名的是山地的妹妹。也许会有多山道爬,重庆美眉们从小便营,这使他们有美丽的锻练性感和苗条。 重庆不是一个时尚的城市重庆的女孩,这是,当然,有些遗憾,不过,上帝的偏爱,他们是出生在MingMouHaoChi和爽直的性格,使她们个性十足的、迷人的、火、定期举行。总体上看,重庆美眉适合做表妹——难忘的初恋情人。
1212121

重庆mm喜欢t.517car.com 重庆只是四川下属的城市,它的光芒长久以来一直成都,盖上,直到它年湿婆儿媳妇成为直辖市,这一次,我们只是惊讶:原来重庆美眉真的有种直辖市氛围相称,受过良好教育。

IE6 position:fixed bug

No Comments

<!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>IE6 position:fixed bug</title>

<style>

* {

padding:0;

margin:0;

}

#rightform {

text-align:center;

padding:50px;

font:14px/22px Georgia, “Times New Roman”, Times, serif;

height:1200px;

background:#ffc;

}

#rightform h1 {

font-family:arial;

background:#e8edef;

height:300px;

line-height:300px;

margin-bottom:200px;

}

#rightform p {

line-height:1.5em;

background:#ffdfff;

padding:90px 0;

}

#rightform form {

background-color:#ddd;

padding:10px 20px;

border:1px solid #aaa;

position:fixed;

right:30px;

top:120px;

}

</style>

<!–[if IE 6]>

<style type=”text/css”>

html{overflow:hidden;}

body{height:100%;overflow:auto;}

#rightform form{position:absolute;}

</style>

<![endif]–>

</head>

<body>

<div id=”rightform”>

<h1>

<a href=”" title=”IE6 position:fixed bug” rel=”bookmark”>IE6 position:fixed bug</a>

</h2>

<p>position:fixed; vs position:absolute;<br />

Created by <a href=”http://blog.happinesz.cn/” title=”sofish”>sofish</a> from <a href=”http://www.happinesz.cn/” title=”blog”>幸福收藏夹</a></p>

<form id=”g_search” method=”get” action=”#”>

<input id=”g_s” name=”g_s” type=”text” value=”"  />

<input id=”g_submit” name=”g_submit” type=”button” value=”search” />

</form>

</div>

</body>

</html>

position:fixed 兼容主流浏览器

No Comments

<!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>模拟position:fixed</title>

</head>

<style>

*{padding:0;margin:0;}

select{width:700px;}

#bottommessage{position:fixed; bottom:0; width:900px; height:100px;background:#090; z-index:999;}

</style>

<!–[if lte IE 6]>

<style type=”text/css”>

body{background-attachment:fixed;background-image:url(about:blank);}/*这个是防止在ie6下拖动抖动*/

#bottommessage{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0))); overflow:hidden;}

#bottommessage iframe{display:none;/*sorry for IE5*/

display/**/:block;/*sorry for IE5*/

position:absolute;/*must have*/

top:0;/*must have*/

left:0;/*must have*/

z-index:-1;/*must have*/

filter:mask();/*must have*/

width:3000px;/*must have for any big value*/

height:1000px;/*must have for any big value*/

}

</style>

<![endif]–>

<body>

<div id=”bottommessage”>fixed

<!–[if lte IE 6]><iframe></iframe><![endif]–>

</div>

<select></select><br/><select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<select></select><br/>

<script type=”text/javascript”>

function $(id){return document.getElementById(id);}

$(‘bottommessage’).style.left=Math.ceil((document.documentElement.clientWidth-$(‘bottommessage’).clientWidth)/2)+’px’;

</script>

</body>

</html>

ie6模拟position:fixed

No Comments

<!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>ie6模拟position:fixed</title>

</head>

<style>

*{padding:0;margin:0;}

#fixeddemo{position:fixed; bottom:0; width:900px; height:100px;background:#090; z-index:999;}

</style>

<!–[if lte IE 6]>

<style type=”text/css”>

body{background-attachment:fixed;background-image:url(about:blank);}/*这个是防止在ie6下拖动抖动*/

#fixeddemo{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}

</style>

<![endif]–>



<!–

/*让position:fixed在IE6下可用! */

.fixed-top /* 头部固定 */{position:fixed;bottom:auto;top:0px;}

.fixed-bottom /* 底部固定 */{position:fixed;bottom:0px;top:auto;}

.fixed-left /* 左侧固定 */{position:fixed;right:auto;left:0px;}

.fixed-right /* 右侧固定 */{position:fixed;right:0px;left:auto;}

/* 上面的是除了IE6的主流浏览器通用的方法 */

* html,* html body /* 修正IE6振动bug */{background-image:url(about:blank);background-attachment:fixed;}

* html .fixed-top /* IE6 头部固定 */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}

* html .fixed-right /* IE6 右侧固定 */ {position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}

* html .fixed-bottom /* IE6 底部固定  */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}

* html .fixed-left /* IE6 左侧固定 */{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}

–>

<body>

<div id=”fixeddemo”>fixed</div>

<br/><br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

<br/>

</body>

</html>

CSS给图片加阴影的两种方法

No Comments

给图片添加阴影可以让图片显示的更加柔和、美观,如果用PhotoShop给每张图片人工添加阴影会很麻烦,而且如果以后网站变更风格可能会造成图片阴影样式和新的网站风格格格不入、很难看。所以用一些小技巧来自动模拟阴影就显得很实用很方便了。

大牛们可以用JS来制作自适应图片大小的图片边框+阴影。但我更偏爱用CSS样式来模拟。以下是两种用CSS给图片添加阴影的方法:

一、用图片制作阴影效果

点击进入演示地址

img {
background: url(img-shadow.png) no-repeat right bottom;
padding: 7px 11px 12px 7px;
}

一般来说我们比较接受光从左上角打过来,在右下角形成阴影的状态。所以我做了一张1000 x 1000像素的图片,图片的右边、下边分别有一块大概5像素的阴影部分。因为背景图片很大,所以1000像素以下的图片都可以用这张背景图来做阴影。

我们给网页里的图片加上上述CSS样式,作用是让我们制作的背景图的右下角和网页内插入图片的右下角对齐。这时候,网页图片是把背景图片盖住的,因 而背景图片不可见,然后设置的padding值得意思是在让网页图片的四个边缘从和背景图片对齐的位置向内偏移7~12像素不等的距离,这样图片下面的阴 影背景图片就会被显示出来了。从而完成了阴影的显示。

转载请注明本文地址:http://www.dimlau.com/blog/2009/01/css-drop-shadow.html

二、用CSS边框模拟阴影效果

点击进入演示地址

上面说过了,我们模拟的是光从左上角打过来时图片在右下角的投影。我们可以想象一下,光从左上角打过来,图片的左边缘和上边缘都会因为光照而变得颜 色很浅,而右边缘和下边缘则会颜色加深。根据这个理论,我们只要给图片的四个边缘分别加上相应颜色、宽度的边框就可以简单模拟阴影了。CSS如下:

img {
background: #f8f8f8;
border-top:1px solid #ccc;
border-right:1px solid #666;
border-bottom:2px solid #999;
border-left:1px solid #ccc;
padding: 7px;
}

当我们设置的几条不同颜色的线骗过了别人的眼睛,让人以为那是阴影……是不是很有成就感?

这两种方法都很简单,第一种图片方法可以把阴影做的更加柔和、第二种方法则更绿色、简单。大家各取所需吧。

点击进入演示地址

来自 http://www.dimlau.com/blog/2009/01/css-drop-shadow.html

CSS中背景background-position负值定位深入理解(转载)

No Comments

 

CSS中背景定位background-position负值一直是不好理解的难点,一方面用的比较少,另一方面的理解的不够深入,今天花了点时间认真的思考了,把我的心得写出来.

下面是我要用到的一个背景图:

HTML页中是162*162的灰色背景DIV块并加入三种不同位置的背景图片,

在浏览器中看到的效果:



从上图可以看到:当为background-position:0 0;时图片的左上角与DIV的左上角是重合的,当我们定位于 background-position:-50px -50px;时发现图片向左上,移动了,也就以DIV的左上角为中心,图向左移动了50PX,向右 也移动了50PX.第三个示例就是上值的情况图移动的效果.这个应该是好理解的.

总结一下就是以上都是以DIV的0,0点为参考点图片移动,如果把DIV区解释为一个坐标轴,图向左,上都为负,向右,下为正值.


好象说这么多你也记不住,那我就告诉你,你应该记住什么吧!


在实践中多数情况是知道一个图的位置要如上图中那个黄色的点,我们应该在效果图上量出它的长度得出两个值都是150PX,那我们定义图的位置就要写 background-position:-150px -150px;这样就定义好了,在图上的量法就看下图(这张图相当于你用的效果图或称设计图), 记住这张图相信你一定能掌握背景图负值的方法了




backgroud-position就是设置背景图像在容器中的位置

要让form在浮动之后还能内联 并且要ie firework兼容 则在form外面加个span

No Comments

要让form在浮动之后还能内联 并且要ie firework兼容 则在form外面加个span就可以了

css设置input的button submit这些背景

No Comments

css设置input的button submit这些背景

用background-image:url(”); 这个ie不能识别

用background:url(”);这个一般的浏览器都能识别出来 所以用这种

ie下面浮动的对象的背景不显示的问题

No Comments

设置为display:inline-block;将对象呈递为内联对象,但是对象的内容作为块对象呈递。旁边的内联对象会被呈递在同一行内

就可以解决了 具体原因不知道

是尝试出来的

css相对布局之间互相层叠的问题

No Comments

<div id=”1″ style=”width:100px; height:100px; background-color:#999; position:relative; z-index:10;”>

<div id=”2″ style=”background-color:#0F6; width:300px; height:300px; left:10px; top:10px;position:absolute; z-index:9999;”>q</div>

</div>

<div id=”3″ style=”width:100px; height:100px; background-color:#09c; position:relative; z-index:2;”></div>

如上面的代码 如果id为1的相对布局的div的z-index不大于id为3的相对布局的div的话

则id为3的相对布局的div就会显示在id为2的绝对布局上面

这个bug只有ie6,7存在

css悬浮框

No Comments

<!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>

<title> new document </title>

<meta name=”generator” content=”mmxcq” />

<meta name=”author” content=”" />

<meta name=”keywords” content=”" />

<meta name=”description” content=”" />

</head>


<body>

<div>

<a href=”#” title=”送达方式的发是发生的发生地方”><span >q</span></a>

</div>

<br/>  <br/>  <br/>

<br/>  <br/>  <br/>  <br/>

<div style=”position:relative;cursor:pointer;” onmouseover=”document.getElementById(‘test’).style.display=’block’;” onmouseout=”document.getElementById(‘test’).style.display=’none’;”>dsfsdf

<div id=”test” style=”position:absolute;left:40px;top:7px; width:300px; height:100px; z-index:99999; background-color:#09c; color:#FFF; border:1px solid #f60;display:none;”>sdfsdf</div>

</div>

<div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div> <div>dsfsdf</div>

</body>

</html>

蓝色理想看到的一个非常不错的LIGHTBOX

No Comments

<!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″ />

<meta name=”author” content=”Chomo” />

<link rel=”start” href=”http://www.14px.com” title=”Home” />

<title>全屏屏蔽、自动居中的lightBox</title>

<style type=”text/css”>

* { margin:0; padding:0; }

html,body { height:100%; overflow:hidden; font:12px/1.5 simsun;}

.myPage { line-height:3; overflow:auto; width:100%; height:100%;}

.lightBox,

.popupCover,

.popupIframe,

.popupComponent { position:absolute; left:0; top:0; width:100%; height:100%;}

.popupComponent { z-index:2; display:none;}

.popupIframe { display:none; _display:block; _filter:alpha(opacity=0);}

.popupCover { background:#000; opacity:0.7; *filter:alpha(opacity=70);}

.lightBox { text-align:center; overflow:auto;}

.lightBoxContent { display:inline-block; *display:inline; zoom:1; width:300px; padding:10px; background:#fff; border:5px solid #00b4ff; vertical-align:middle;}

.lightBoxMaxHeight { display:inline-block; vertical-align:middle; height:100%; *height:99.5%; width:1px; overflow:hidden; margin-left:-1px;}

.lightBoxWrapper { display:inline-block; *display:inline; zoom:1; text-align:left;}

.lightBoxClose { color:#f00;}

.lightBoxSubmit { margin-top:10px; padding-top:5px; border-top:1px solid #ccc;}

.lightBoxSubmit input { font-size:12px; padding:0 10px; overflow:visible; margin:0 5px;}

</style>

</head>

<body>

<div class=”popupComponent” id=”lightBox”>

<iframe class=”popupIframe”></iframe>

<div class=”popupCover”></div>

<div class=”lightBox”>

   <span class=”lightBoxMaxHeight”></span>

   <div class=”lightBoxContent”>

    <div class=”lightBoxWrapper”>

     当提示小于一行时文字居中<br />

    </div>

    <div class=”lightBoxSubmit”>

     <input type=”button” value=”确定” onclick=”hideLayer(‘lightBox’)” />

     <input type=”button” value=”取消” onclick=”hideLayer(‘lightBox’)” />

    </div>

   </div>

</div>

</div>

<div class=”popupComponent” id=”lightBox2″>

<iframe class=”popupIframe”></iframe>

<div class=”popupCover”></div>

<div class=”lightBox”>

   <div class=”lightBoxContent”>

    <div class=”lightBoxWrapper”>

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

     当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度 当内容已经超过了一屏的高度<br />

    </div>

    <div class=”lightBoxSubmit”>

     <input type=”button” value=”确定” onclick=”hideLayer(‘lightBox2′)” />

     <input type=”button” value=”取消” onclick=”hideLayer(‘lightBox2′)” />

    </div>

   </div>

   <span class=”lightBoxMaxHeight”></span>

</div>

</div>

<div class=”myPage”>

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

<div style=”text-align:center;”><input type=”button” value=”位于第一屏的按钮” onclick=”showLayer(‘lightBox’)” /></div>

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

<select><option>一个用于测试IE6中是否能覆盖住的select</option></select><br />

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

<select><option>又一个用于测试IE6中是否能覆盖住的select</option></select><br />

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

<div style=”text-align:center;”><input type=”button” value=”位于第二屏中的按钮” onclick=”showLayer(‘lightBox’)” /><input type=”button” value=”当内容已经超过了一屏的高度” onclick=”showLayer(‘lightBox2′)” /></div>

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />假装很丰富的内容<br />

</div>

<script>

function showLayer(id) {

document.getElementById(id).style.display = “block”;

}

function hideLayer(id) {

document.getElementById(id).style.display = “none”;

}

</script>

</body>

</html>

纯css tooltip

No Comments

<!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>

<style type=”text/css”>

*{margin:0;padding:0;}

a:hover {background:#ffffff; text-decoration:none;} /*BG color is a must for IE6*/

a.tooltip span {display:none; padding:2px 3px; width:130px;}

a.tooltip:hover span{display:inline; position:absolute; background:#ffffff; border:1px solid #cccccc; color:#6c6c6c;z-index:9999;}



</style>

</head>

<body>

<div style=”width:900px;margin:auto;margin-top:100px;”>TooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipEasyTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipTooltipEasy <a class=”tooltip” href=”#”>Tooltip<span>This is the crazy little Easy Tooltip Text.</span></a>TooltipTooltipTooltipTooltipTooltip

</div>

</body>

</html>

css圆角

No Comments

<!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>无标题文档</title>

<style type=”text/css”>

.container {width:200px;margin:auto;}

.holder {color:#000;}

.b1 {height:1px; font-size:1px; overflow:hidden; display:block; background:#ddd; margin:0 5px;}

.b2 {height:1px; font-size:1px; overflow:hidden; display:block; background:#fff; border-right:2px solid #ddd; border-left:2px solid #ddd; margin:0 3px;}

.b3 {height:1px; font-size:1px; overflow:hidden; display:block; background:#fff; border-right:1px solid #ddd; border-left:1px solid #ddd; margin:0 2px;}

.b4 {height:2px; font-size:1px; overflow:hidden; display:block; background:#fff; border-right:1px solid #ddd; border-left:1px solid #ddd; margin:0 1px;}

.content {border-right:1px solid #ddd; height:154px;border-left:1px solid #ddd;width:198px;}

.content h3{color:#666;font-size:13px;height:28px;line-height:22px;border-bottom:1px solid #ddd;width:100%;margin:0;padding:0;display:block;}

</style>

</head>

<body>

<div class=”container”><!–start container–>

    <b class=”b1″></b><b class=”b2″></b><b class=”b3″></b><b class=”b4″></b>

    <div class=”content”><!–start content–>

      <h3></h3>

      <ul><br /><br /><br /><br /><br /></ul>

    </div><!–end content–>

<b class=”b4″></b><b class=”b3″></b><b class=”b2″></b><b class=”b1″></b>

</div><!–end container–>

</body>

</html>