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

css页面布局和导航示例

<html>
<head>
<mce:style type="text/css"><!--
div.container
{
width:100%;
margin:0px;
border:1px solid gray;
line-height:150%;
}
div.header,div.footer
{
padding:0.5em;
color:white;
background-color:gray;
clear:left;
}
h1.header
{
padding:0;
margin:0;
}
div.left
{
float:left;
width:160px;
margin:0;
padding:1em;
}
div.content
{
margin-left:190px;
border-left:1px solid gray;
padding:1em;
}
--></mce:style><style type="text/css" mce_bogus="1">div.container
{
width:100%;
margin:0px;
border:1px solid gray;
line-height:150%;
}
div.header,div.footer
{
padding:0.5em;
color:white;
background-color:gray;
clear:left;
}
h1.header
{
padding:0;
margin:0;
}
div.left
{
float:left;
width:160px;
margin:0;
padding:1em;
}
div.content
{
margin-left:190px;
border-left:1px solid gray;
padding:1em;
}</style>
</head>
<body>
<div class="container">
<div class="header"><h1 class="header">W3School.com.cn</h1></div>
<div class="left"><p>"Never increase, beyond what is necessary, the number of entities required to explain anything." William of Ockham (1285-1349)</p></div>
<div class="content">
<h2>Free Web Building Tutorials</h2>
<p>At W3School.com.cn you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.</p>
<p>W3School.com.cn - The Largest Web Developers Site On The Net!</p></div>
<div class="footer">Copyright 2008 by YingKe Investment.</div>
</div>
</body>
</html>
 
<html>
<head>
<mce:style type="text/css"><!--
ul
{
float:left;
width:100%;
padding:0;
margin:0;
list-style-type:none;
}
a
{
float:left;
width:7em;
text-decoration:none;
color:white;
background-color:purple;
padding:0.2em 0.6em;
border-right:1px solid white;


相关文档:

CSS HACK原理简介

简介  
    什么是CSS hack(http://www.cssplay.org.cn/css-hack/index.html)由于不同的浏览器,比如Internet Explorer 6,Internet Explorer 7,Mozilla Firefox等,对CSS的解析认识不一样,因此会导致生成的页面效果不一样,得不到我们所需要的页面效果。
  这个时候我们就需要针对不同的浏览器 ......

css自动截取字符串

提供一种用CSS代码实现自动截取字符串的方法:
CSS代码如下:
<style>
body{
background-color:#f4f4f4;
font-size:12px;
}
div.test{
width:200px;
height:100px;
border:1px solid red;
border-top:4px solid red;
padding:10px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
} ......

兼容IE各版本的纯CSS二级下拉菜单

这是一个标准的CSS下拉菜单制作教程,有针对目前流行的IE6/IE7/IE8不同版本的CSS代码,因此可以在IE之间完全兼容,不过其它的浏览器像火狐/GG浏览器之类的没有测试,如果兼容IE8的话,那么兼容火狐应该问题不大吧。菜单使用蓝色基调,滑向二级菜单更换背景,操作的感觉很舒服。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XH ......

用JS来切换CSS,很好很简单

假如我们想通过前台自主选择CSS样式来达到改变颜色、风格等目的的话,用JS调用CSS文件就OK。
先做两个(或多个)CSS文件。
style_1.css 代码:
body{background-color: #ccff66;}
......
style_2.css 代码:
body{background-color: #ff0000;}
......
JS代码如下:
<link rel="stylesheet" rev="stylesheet" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号