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

css三种样式!

内部样式表
内部样式表需要在网页的<head>部分定义,格式如下:
<head>
<style type="text/css">
/*符合CSS语法结构的CSS语句,例如*/
body { background-color: blue; }
</style>
</head>
行内样式表(内嵌样式表)
行内样式表直接在标签内部定义,使用style属性,写法如下:
<标签 style="符合CSS语法结构的CSS语句">
例如:
<p style="text-indent:24px;">段落内容</p>
外部样式表
使用外部样式表时,CSS文件与网页文件(html)是分离开来的。要让某一个网页调用一个外部CSS文件,你需要在网页的<head>部分插入以下内容:
<head>
<link rel="stylesheet" type="text/css" 
href="文件位置/你的CSS文件名.css" />
/*文件位置就是所处在的文件夹相对与当前网页的相对路径*/
</head>


相关文档:

CSS中元素的隐藏和显示(visibility, display)

 visibility: hidden, visible
 display: block, inline, none
visibility: 控制页面元素的显示和隐藏,不空值元素的位置特征。
document.getElementById("div").style.visibility = "hidden"; //隐藏元素
document.getElementById("div").style.visibility = "visible"; //显示元素
当元素在页面是隐藏时, ......

网页中常用的几个cSS技巧

 
这段时间在学习css,总结了一些技巧来和大家分享下:
  1、使用 line-height 垂直居中
  line-height:24px;
  使用固定宽度的容器并且需要一行垂直居中时,使用 line-height 即可(高度与父层容器一致),更多的垂直居中总结可以看这里。
  2、清除容器浮动
  #main {
  overflow:hidden;
  }
......

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 y ......

css实现导航栏的制作

       平时我们在浏览网页的时候,常常看见导航栏是动态的,其实我们可以通过css样式表的定义就可以完成。
首先我们看一下css代码:
#nav {
width:900px;
margin:0 auto;
background:#E1F4FD;
}
#nav li {
float:left;
font-size:14px;
}
#nav li a {
color:#000000;
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号