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

进行页面设计,分享DIV+CSS一些小规则

在进行页面设计的时候,相信下面这些东西应该能够帮助你,DIV+CSS,希望可以为你节省一点时间。
一、           善用css缩写规则
    /*注意上、右、下、左的书写顺序*/
1.      关于边距(4边):
1px 2px 3px 4px (上、右、下、左)
1px 2px 3px    (省略的左等于右)
1px 2px         (省略的上等于下)
1px            (四边都相同)
 
2.      简化所有:
*/ body{margin:0}------------表示网页内所有元素的margin为0
#menu{ margin:0}------------表示menu盒子下的所有元素的margin为0
 
3.      缩写(border)特定样式:
Border:1px solid #ffffff;
Border-width:0 1px 2px 3px;
 
4.      关于文字的缩写规则:
Font-style:italic; 斜体形式
Font-variant:small-caps/normal; 变体样式:小型大写字母/正常
Font-weight:bold;
Font-size:12px;
Line-height:1.2em(120%)/1.5em(150%);
Font-family:arrial,sans-serif,verdana;
缩写成:
Font:italic small-caps bold 12px/1.5em arrial,sans-serif;
注意:Font-size和Line-height用斜杠组合在一起不能分开写。
 
5.      关于背景图片的:
Background:#FFF url(log.gif) no-repeat fixed top left;
 
6.      关于列表:
List-style-type:square/none;
List-style-position:inside;
List-style-image:url(filename.gif);
缩写成:
List-style:none inside url(filename.gif);
 
 
 
二、           运用4种方法来引入CSS样式
     1.link
<link rel=”stylesheet” type=”text/css” href=”a.css”>
rel 关系
type 数据类型,有多种
href 路径
部分浏览器支持候选样式,关键字:alternate:
<link rel=”stylesheet” type=”text/css” href=”a.css”>
<link rel=”alternate stylesheet&


相关文档:

CSS 样式大全

 白色 #FFFFFF                 2 红色 #FF0000               3 绿色 #00FF00             ......

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设置ie7,ie8中div高度自动设置

ie6中div的高度自动设置,到了ie7和ie8就不行了,需要设置css
/*针对非IE*/
div:after {
    content:".";
    display:block;
    height:0;
    clear:both;
    visibility:hidden;
}
/*针对IE*/
div{zoom:1;} ......

css实现强制不换行/自动换行/强制换行

强制不换行
div{
white-space:nowrap;
}
自动换行
div{
word-wrap: break-word;
word-break: normal;
}
强制英文单词断行
div{
word-break:break-all;
}
源地址:http://www.iwms.net/n1919c40.aspx
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号