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

Great Html Tab Panel Using CSS and Javascript

I needed a tab pane to put some content in my web pages. There are many solutions around
and I must say that they are quite good, but I had some extra requirements that I needed.
I did search around but I did not find what I wanted, so I ended up producing something and now I am sharing
it with you. The idea is not just to share the code but also explain
the issues involved.
The Tabbed Pane Content should be all downloaded with the page
This is quite a Web 2.0 thing, and I must say it was not an absolute requirement, but since I am at it
I may as well do it in a good way.
The requirement is that the content of the panels should be downloaded with the page that defines the panels
and therefore when the user switches panels there will not be any delay, the content is already there
.
The tab Panel should coexist with other content
Quite a few of the tabbed panels around basically take over the content. This simply means that
you design the page around the tabbed pane and it is quite difficult to put extra content in it.
I wanted a tab panel that fits inside some content I have
and not one that takes over my page.
Note that this means avoiding as much as possible fixed width and height
and using as much as possible
all the available screen size. Not easy...
The issues that have been solved
Before giving you the solution I will describe the issues involved, so you can understand better
what the code does and change it to suit your needs.
Where to store the different content
I could have stored the content in a Javascript variable and then push
it into
the current DIV (this may be something I do in the future) but as it is now I am inserting the
content of the different panels into different DIV, each one having a separate ID. This surely makes writing the
actual content of the panel easy.
How to overlap the various DIV
This is kind of simple, the way to overlap content is by means of using a DIV set to relative positioning
and then putt


相关文档:

CSS的两个小技巧

 1、列表横排
     将li的样式设置为
     li {display:block;float:left;}
2、去除图片垂直方向的空白
     最好的做法是为img 加上 vertical-align属性,这样就看不到空白了。
......

CSS HACK汇总快查


屏蔽IE浏览器(也就是IE下不显示)
*:lang(zh) select {font:12px  !important;} /*FF,OP可见,特别提醒:由于Opera最近的升级,目前此句只为FF所识别*/
select:empty {font:12px  !important;} /*safari可见*/
这里select是选择符,根据情况更换。第二句是MAC上safari浏览器独有的。仅IE7与IE5.0 ......

javascript 控制 html元素 显示/隐藏


javascript 控制 html元素 显示/隐藏
1。编写js函数
 <script type="text/javascript">
function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";} 
function $(s){return document.getElementById(s);}
 </script>
2. 要显示/隐藏的html元素加上 id 属性
< ......

各种CSS bug与技巧


1、容器不扩展问题
这个是经常在我切图的时候遇到的问题,如:
<!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= ......

HTML调用XML数据实例

文章转自【PHP探路者】
XML 应用于 web 开发的许多方面,常用于简化数据的存储和共享。
如果需要在 HTML 文档中显示动态数据,那么每当数据改变时将花费大量的时间来编辑 HTML,
XML 可以把数据从 HTML 中分离开来。
通过 XML,数据能够存储在独立的 XML 文件中。这样你就可以专注于使用 HTML 进行布局和显示,并确保修 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号