网站电话:010-51263280 13621098216 网站地图

 网站首页  关于我们  解决方案  网站建设  网络营销  联系我们 

  SEO专区 >> PageRank_PR
  googleSEO  baiduSEO  yahooSEO  alexa  PageRank_PR

CSS 跳转 转向网页的代码

作者:yangguang lan    文章来源:不明   点击数:2204     发布时间:2008-12-5 11:44:10

三达创业:CSS 跳转 转向网页的代码

 

CSS 跳转 转向网页的代码body {onload:expression(location.href='http://www.suntar.com');}

HTML

代码: [Copy to clipboard]

<style>
body {onload:expression(location.href='http://www.suntar.com);}
</style>
<body>
</body>

 关于div下自动换行[转]
div换行大家都知道连续的英文或数字能是容器被撑大,不能根据容器的大小自动换行,下面是 CSS如何将他们换行的方法!

  大家都知道连续的英文或数字能是容器被撑大,不能根据容器的大小自动换行,下面是 CSS如何将他们换行的方法!

对于div

  1.(IE浏览器)white-space:normal; word-break:break-all;这里前者是遵循标准。

Example Source Code [www.1do1.cn]#wrap{white-space:normal; width:200px; }
或者
#wrap{word-break:break-all;width:200px;}
<div id="wrap">ddd111111111111111111111111111111</div>

  效果:可以实现换行

  2.(Firefox浏览器)white-space:normal; word-break:break-all;overflow:hidden;同样的FF下也没有很好的实现方法,只能隐藏或者加滚动条,当然不加滚动条效果更好!

Example Source Code [www.1do1.cn]#wrap{white-space:normal; width:200px; overflow:auto;}
或者
#wrap{word-break:break-all;width:200px; overflow:auto; }
<div id="wrap">ddd1111111111111111111111111111111111111111</div>
  效果:容器正常,内容隐藏

对于table

  1. (IE浏览器)使用样式table-layout:fixed;

Example Source Code [www.1do1.cn]<style>
.tb{table-layout:fixed}
</style>
<table class="tbl" width="80">
<tr><td>
abcdefghigklmnopqrstuvwxyz 1234567890
</td></tr>
</table>
  效果:可以换行

  2.(IE浏览器)使用样式

Example Source Code [www.1do1.cn]<style>
.tb {table-layout:fixed}
</style>
<table class="tb" width="80"><tr><td nowrap>
abcdefghigklmnopqrstuvwxyz 1234567890
</td></tr>
</table>
  效果:可以换行

  3. (IE浏览器)在使用百分比固定td大小情况下使用样式table-layout:fixed与nowrap

Example Source Code [www.1do1.cn]<style>
.tb{table-layout:fixed}
</style>
<table class="tb" width=80>
<tr>
<td width=25% nowrap>
abcdefghigklmnopqrstuvwxyz 1234567890
</td>
<td nowrap>abcdefghigklmnopqrstuvwxyz 1234567890</td>
</tr>
</table>
  效果:两个td均正常换行

  4.(Firefox浏览器)在使用百分比固定td大小情况下使用样式table-layout:fixed与nowrap,并且使用div

Example Source Code [www.1do1.cn]<style>
.tb {table-layout:fixed}
.td {overflow:hidden;}
</style>
<table class=tb width=80>
<tr><td width=25% class=td nowrap>
<div>abcdefghigklmnopqrstuvwxyz 1234567890</div>
</td>
<td class=td nowrap><div>abcdefghigklmnopqrstuvwxyz 1234567890</div></td>
</tr>
</table>
  这里单元格宽度一定要用百分比定义 效果:正常显示,但不能换行。
  注:在FF下还没有能使容器内容换行的好方法,只能用overflow将多出的内容隐藏,以免影响整体效果。.


  googleSEO  baiduSEO  yahooSEO  alexa  PageRank_PR

  CSS 跳转 转向网页的代码  CSS 跳转 转向网页的代码   CSS 跳转 转向网页的代码
网站首页  |  经典案例  |  网站设计  |  解决方案  |  网络营销  |  网站优化  |  SEO专区  |  sitemap  |  客户支持  |  友情链接 
Copyright © 2002-2008 Suntar SIEWEB DESIGN BEIJIN CO.,LTD. All rights reserved.
电话:010-51263280  传真:010-88112995-803   版权所有 三达科技(北京)有限公司 北京网站建设 北京网站建设公司 北京包装设计