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

css菜单导航

这是我在一个网站上看到的,CSS控制一个菜单,很经典实用
Css文件如下:css.css
@charset "UTF-8";
/* navigation.css
$Revision: 1.0 $
(c) 2008 Fortinet, Inc. All rights reserved.
*/
/* Navigation Styles ------------------------------------------- */
#wrapper
{
 width:1000px;margin:0 auto;
}
#nav_bar {
 clear: both;
 background: url(./menu_bkrd.jpg) repeat-x;
 height: 26px;
 width: 100%;
}
#navigation {
 padding: 0 0 0 10px;
}
#nav, #nav ul {
 float: left;
 list-style: none;
 line-height: 1;
 padding: 0 0 0 0; /* 0 0 0 0.5em; */
 margin: 0; /* 0 0 1em 0; */
 /* border: solid 1px #33FF00; /* (Green) remove this item after testing */
 width:auto;
}
#nav a {
 font: 11px/12px Tahoma, Arial, Helvetica, Verdana, sans-serif;
 color: #6a737b;
 display: block;
 width: 150px; /* 6em; 3em; 10em -- 150px*/
 text-decoration: none;
 padding: 7px 10px 4px 6px; /* 0.5em 3.5em 0.2em .5em; 0.4em 0 0.2em 0; // 0.4em 2em 0.2em 2em; // 0.5em 2em; */
  margin: 0px; /* 0.5em 2em;  uncommented - fixes extra space on right for IE  0 0 0 1px */
 /* border: solid 1px #FF0000; /* (Red) remove this item after testing */
}
#nav a.top_nav {
 font: 12px Arial, Helvetica, sans-serif;
 color: #6a737b;
 text-align: center;
 width: 90px;
 margin: 0;
 padding: 6px 0 4px 0;
 text-decoration: none;
 font-weight: bold;
 white-space: nowrap; /*  */
}
#nav a.nav_parent {
 background: url(./rightarrow.gif) center right no-repeat;
 /* white-space: nowrap; /*  */
 /* border: solid 1px #FFFF00; /* (yellow) remove this item after testing */
}
#nav li {
 /*float: left;*/
 padding: 0;
 /* width: 150px; /* 7.5em; 10em; 12em  178px; this has no affect whatsoever */
 /* border: solid 1px #FFFF00; /* (yellow) remove this item after testing */
}
#nav li.top_nav


相关文档:

CSS hack:IE6,IE7,firefox显示不同效果

区别不同浏览器的CSS hack写法:
区别IE6与FF:
       background:orange;*background:blue;
区别IE6与IE7:
       background:green !important;background:blue;
区别IE7与FF:
      &nb ......

常用CSS命名规范

模块:module.css
基本共用:base.css
布局、版面:layout.css
主题:themes.css
专栏:columns.css
文字:font.css
表单:forms.css
补丁:mend.css
打印:print.css
头:header  
内容:content/container  
尾:footer  
导航:nav  
侧栏:sidebar
栏目:column  
页面外围控制整体布局宽度: ......

几个div+css图片滚动显示的代码

由下往上的:
<div id="demo" onmouseover="ij=1" style="border:1px solid gray; overflow: hidden; height: 119px; width:211px " onmouseout="ij=0">
<div id="demo1">1<br />2br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>
可以是任何的HTML内容<br&g ......

JavaScript CSS Style属性对照表

JavaScript代码
<mce:script type="text/javascript"><!--
function imageOver(e) {
e.style.border="1px solid red";
}
function imageOut(e) {
e.style.borderWidth=0;
}
// --></mce:script>
<img src="phplamp.gif" onmouseover="imageOver(this)" onmo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号